summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorAbhinav Prasai <abhinav.prsai@gmail.com>2025-10-06 22:22:59 +0100
committerAbhinav Prasai <abhinav.prsai@gmail.com>2025-10-06 22:22:59 +0100
commite293b472c840521d06d661fa79d5b1204dab6930 (patch)
tree90f80db6b8ff60ddfc2655214ca1a3a14905e140 /README.md
parentb14fc6485b155cac1fdfbb07ba7f3c57ae174fa3 (diff)
clear up documentation + revamp manpage, README, add sxwm.md
just a bunch of documentation. see diff to see more
Diffstat (limited to 'README.md')
-rw-r--r--README.md228
1 files changed, 18 insertions, 210 deletions
diff --git a/README.md b/README.md
index 1d31329..67d314d 100644
--- a/README.md
+++ b/README.md
@@ -1,226 +1,32 @@
<div align="center">
- <img src="images/sxwm_logo.png" width="50%">
+ <img src="logo.png" width="50%">
<br>
- <b>Minimal, fast, configurable. Tiling X11 window manager.</b>
+ <b>A very SeXy WM</b>
<br><br>
<img src="https://img.shields.io/github/v/release/uint23/sxwm?style=flat-square">
<img src="https://img.shields.io/github/license/uint23/sxwm?style=flat-square">
</div>
-Feel free to join our IRC channel on [Libera.Chat at #sxwm](https://web.libera.chat/?channels=#sxwm).
-Contributions are welcome! Please read CONTRIBUTIONS.md for more information.
-
-> [!WARNING]
-> From commit `7a7c6300`, `master_previous` binding has now been renamed to `master_prev`.
-> Please update your `sxwmrc` accordingly.
-
-> [!NOTE]
-> The codebase of `SXWM` has certainly inflated a lot. Although it's nearing the same amount of code as `dwm`,
-> that doesn't mean that it's gotten more bloated, rather the opposite is true. I have been cleaning up and
-> refactoring the code so that it's more readable and faster; this does _not_ affect the performance.
-
-## Table of Contents
-- [Launch Args](#launch-args)
-- [Features](#features)
-- [Screenshots](#screenshots)
-- [Configuration](#configuration)
-- [Keybindings](#keybindings)
- - [Example Bindings](#example-bindings)
- - [Default Keybindings](#default-keybindings)
-- [Dependencies](#dependencies)
-- [Build & Install](#build--install)
-- [Makefile Targets](#makefile-targets)
-- [Thanks & Inspiration](#thanks--inspiration)
-
---
-## Launch Arguments
+## Contributions & Issues
-### `-v` or `--version`
-Displays the current version of `sxwm`
-
-### `-b` or `--backup`
-Allows user to use backup keybinds with `sxwm`
+Please read [the contribution guide](docs/CONTRIBUTIONS.md)
---
-## Features
-
-- **Tiling & Floating**: Switch seamlessly between layouts.
-- **Workspaces**: 9 workspaces, fully integrated with your bar.
-- **Scratchpads**: Floating windows you can summon/hide instantly.
-- **Window Swallowing**: Native window swallowing support.
-- **Hot Reload**: Apply custom configuration and reload with custom keybind.
-- **Easy Config**: User-friendly `sxwmrc` file, no C required.
-- **Master-Stack Layout**: DWM-inspired productive workflow.
-- **Mouse Support**: Move, swap, and resize windows with the mouse.
-- **Minimal Dependencies**: Only `libX11`, `Xinerama` and `XCursor` are required.
-- **Lightweight**: Single C file, minimal headers, compiles in seconds.
-- **Xinerama Support**: Multi-monitor ready.
-- **Efficient**: Designed for speed and low resource usage(2-3 Mbs of RAM).
-
----
+## Features & Configuration
-## Configuration
-
-`sxwm` is configured via a simple text file located at `~/.config/sxwmrc`. Changes can be applied instantly by reloading the configuration (`MOD + r`).
-
-The file uses a `key : value` format. Lines starting with `#` are ignored.
-
-### General Options
-
-| Option | Type | Default | Description |
-|--------------------------|---------|-----------|-----------------------------------------------------------------------------|
-| `mod_key` | String | `super` | Sets the primary modifier key (`alt`, `super`, `ctrl`). |
-| `gaps` | Integer | `10` | Pixels between windows and screen edges. |
-| `border_width` | Integer | `1` | Thickness of window borders in pixels. |
-| `focused_border_colour` | Hex | `#c0cbff` | Border color for the currently focused window. |
-| `unfocused_border_colour`| Hex | `#555555` | Border color for unfocused windows. |
-| `swap_border_colour` | Hex | `#fff4c0` | Border color when selecting a window to swap (`MOD+Shift+Drag`). |
-| `master_width` | Integer | `60` | Percentage of the screen width for the master window. |
-| `resize_master_amount` | Integer | `1` | Percent to increase/decrease master width. |
-| `resize_stack_amount` | Integer | `20` | How many pixels to increase/decrease stack windows by |
-| `snap_distance` | Integer | `5` | Distance (px) before a floating window snaps to edge. |
-| `motion_throttle` | Integer | `60` | Target FPS for mouse drag actions. |
-| `should_float` | String | `"st"` | Always-float rule. Multiple entries should be comma-seperated. Optionally, entries can be enclosed in quotes.|
-| `start_fullscreen` | String | `"st"` | Starts specified windows that should start fullscreened. Enclosed in quotes and comma-seperated|
-| `new_win_focus` | Bool | `true` | Whether openening new windows should also set focus to them or keep on current window.|
-| `warp_cursor` | Bool | `true` | Warp the cursor to the middle of newly focused windows |
-| `exec` | String | `Nothing` | Command to run on startup (e.g., `sxbar`, `picom`, "autostart", etc.). |
-| `can_swallow` | String | `st` | Windows that can swallow. |
-| `can_be_swallowed` | String | `mpv` | Windows that can be swallowed. |
-| `new_win_master` | Bool | `false` | New windows will open as master window. |
-
----
-
-## Keybindings
-
-### Syntax
-
-- **Modifiers**: `mod`, `shift`, `ctrl`, `alt`, `super`
-- **Key**: Case-insensitive keysym (e.g., `Return`, `q`, `1`)
-- **Action**: Either an external command (in quotes) or internal function.
-- **move**: Move to that worspace
-- **swap**: Swap window to that workspace
-- **n**: Workspace / Scratchpad number
-- **create**: Creates a scratchpad on that slot
-- **toggle**: toggles the visibility of that scratchpad
-- **remove**: Removes the scratchpad on that slot
-
-```sh
-bind : modifier + modifier + ... + key : action
-```
-
-```sh
-scratchpad : modifier + ... + key : create n
-scratchpad : modifier + ... + key : toggle n
-scratchpad : modifier + ... + key : remove n
-```
-
-```sh
-workspace : modifier + modifier + ... + key : move n
-workspace : modifier + modifier + ... + key : swap n
-```
-
-### Available Functions
-
-| Function Name | Description |
-|----------------------|--------------------------------------------------------------|
-| `close_window` | Closes the focused window. |
-| `decrease_gaps` | Shrinks gaps. |
-| `focus_next` | Moves focus forward in the stack. |
-| `focus_prev` | Moves focus backward in the stack. |
-| `focus_next_mon` | Switches focus to the next monitor. |
-| `focus_prev_mon` | Switches focus to the previous monitor. |
-| `move_next_mon` | Moves the focused window to the next monitor. |
-| `move_prev_mon` | Moves the focused window to the previous monitor. |
-| `increase_gaps` | Expands gaps. |
-| `master_next` | Moves focused window down in master/stack order. |
-| `master_prev` | Moves focused window up in master/stack order. |
-| `quit` | Exits `sxwm`. |
-| `reload_config` | Reloads config. |
-| `master_increase` | Expands master width. |
-| `master_decrease` | Shrinks master width. |
-| `toggle_floating` | Toggles floating state of current window. |
-| `global_floating` | Toggles floating state for all windows. |
-| `fullscreen` | Fullscreen the focused window. |
-| `centre_window` | Centre the focused window. |
-
-### Example Bindings
-
-```yaml
-# Launch terminal
-bind : mod + Return : "st"
-# Close window
-bind : mod + shift + q : close_window
-
-# Scratchpads
-scratchpad : mod + ctrl + Return : create 1
-scratchpad : mod + shift + b : toggle 2
-scratchpad : mod + alt + b : remove 2
-
-# Switch workspace
-workspace : mod + 3 : move 3
-# Move window to workspace
-workspace : mod + shift + 5 : swap 5
-```
-
----
-
-## Default Keybindings
-
-### Window Management
-| Combo | Action |
-| --------------------------- | ---------------------------------- |
-| `Mouse` | Focus on click under cursor |
-| `MOD` + `Left Mouse` | Move window with mouse |
-| `MOD` + `Right Mouse` | Resize window with mouse |
-| `MOD` + `j` / `k` | Focus next / previous |
-| `MOD` + `Shift` + `j` / `k` | Move window in master stack |
-| `MOD` + `,` / `.` | Focus prev / next monitor |
-| `MOD` + `Shift` + `,` / `.` | Move window to prev / next monitor |
-| `MOD` + `h` / `l` | Resize master area (decr/incr) |
-| `MOD` + `Ctrl` + `h` / `l` | Resize stack area (decr/incr) |
-| `MOD` + `=` / `-` | Increase / decrease gaps |
-| `MOD` + `Space` | Toggle floating |
-| `MOD` + `Shift` + `Space` | Toggle all floating |
-| `MOD` + `Shift` + `f` | Toggle fullscreen for focused window |
-| `MOD` + `Shift` + `q` | Close focused window |
-| `MOD` + `Shift` + `e` | Quit sxwm |
-| `MOD` + `r` | Reload configuration |
-| `MOD` + `c` | Centre window |
-
-### Scratchpads
-
-| Combo | Action |
-| ---------------------------------- | -------------------------------- |
-| `MOD` + `Alt` + `1–4` | Create scratchpad 1–5 |
-| `MOD` + `Ctrl` + `1–4` | Toggle scratchpad 1–5 |
-| `MOD` + `Alt` + `Shift` + `1–4` | Remove scratchpad 1–5 |
-
-### Workspaces
-
-| Combo | Action |
-| ----------------------- | ---------------------------- |
-| `MOD` + `1–9` | Switch to workspace 1–9 |
-| `MOD` + `Shift` + `1–9` | Move window to workspace 1–9 |
-
-### Applications
-
-| Combo | Action | Program |
-| ---------------- | ------------- | ----------- |
-| `MOD` + `Return` | Open terminal | `st` |
-| `MOD` + `b` | Open browser | `firefox` |
-| `MOD` + `p` | Run launcher | `dmenu_run` |
+Check [the man page markdown for relevant info](docs/sxwm.md)
---
## Dependencies
-- `libX11` (Xorg client library)
+- `libX11`
- `Xinerama`
- `XCursor`
-- GCC or Clang & Make
+- CC & Make
<details>
<summary>Debian / Ubuntu / Linux Mint</summary>
@@ -312,7 +118,9 @@ pkg install clang make xcb-util-keysyms xorgproto libxcursor libx11 libxinerama
### Arch Linux (AUR)
-```sh
+> [!NOTE]
+> I don't maintain any packages. Use with caution!
+
yay -S sxwm
# OR for latest features:
yay -S sxwm-git
@@ -329,9 +137,8 @@ sudo xbps-install -S sxwm
```sh
git clone --depth=1 https://github.com/uint23/sxwm.git
cd sxwm/
-# Replace make with gmake on FreeBSD
make
-sudo make clean install
+sudo/doas make clean install
```
### Run
@@ -340,6 +147,7 @@ Add to your `~/.xinitrc`:
```sh
exec sxwm
```
+Or use the `sxwm.desktop` file
---
## Makefile Targets
@@ -361,13 +169,13 @@ exec sxwm
## Thanks & Inspiration
-- [dwm](https://dwm.suckless.org) — Tiling & source code
-- [i3](https://i3wm.org) — Easy configuration
-- [sowm](https://github.com/dylanaraps/sowm) — README inspiration
-- [tinywm](http://incise.org/tinywm.html) — Minimal X11 WM
+- [dwm](https://dwm.suckless.org) - Tiling & source code
+- [i3](https://i3wm.org) - Easy configuration
+- [sowm](https://github.com/dylanaraps/sowm) - README inspiration
+- [tinywm](http://incise.org/tinywm.html) - Minimal X11 WM
---
<p align="center">
- <em>Abhinav Prasai [2025]</em>
+ <em>uint [2025]</em>
</p>