diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 113 |
1 files changed, 75 insertions, 38 deletions
@@ -40,6 +40,8 @@ Allows user to use backup keybinds with `sxwm` - **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. - **Live Config Reload**: Change your config and reload instantly with a keybind. - **Easy Configuration**: Human-friendly `sxwmrc` file, no C required. - **Master-Stack Layout**: DWM-inspired productive workflow. @@ -75,11 +77,16 @@ The file uses a `key : value` format. Lines starting with `#` are ignored. | `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.| | `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. | --- @@ -87,23 +94,30 @@ The file uses a `key : value` format. Lines starting with `#` are ignored. ### 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 ``` -- **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. +```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 ``` -- **Modifiers**: `mod`, `shift`, `ctrl`, `alt`, `super` -- **Key**: Case-insensitive keysym (e.g., `Return`, `q`, `1`) -- **move**: Move to that worspace -- **swap**: Swap window to that workspace -- **n**: Workspace number ### Available Functions @@ -113,10 +127,10 @@ workspace : modifier + modifier + ... + key : swap n | `decrease_gaps` | Shrinks gaps. | | `focus_next` | Moves focus forward in the stack. | | `focus_previous` | 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. | +| `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. | @@ -126,7 +140,8 @@ workspace : modifier + modifier + ... + key : swap n | `master_decrease` | Shrinks master width. | | `toggle_floating` | Toggles floating state of current window. | | `global_floating` | Toggles floating state for all windows. | -| `fullscreen` | Fullscreen toggle. | +| `fullscreen` | Fullscreen the focused window. | +| `centre_window` | Centre the focused window. | ### Example Bindings @@ -136,6 +151,11 @@ 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 @@ -147,31 +167,48 @@ workspace : mod + shift + 5 : swap 5 ## Default Keybindings ### Window Management - -| Combo | Action | -| ---------------------------- | ------------------------- | -| Mouse | Focus under cursor | -| `MOD` + Left Mouse | Move window by mouse | -| `MOD` + Right Mouse | Resize window by mouse | -| `MOD` + `j` / `k` | Focus next / previous | -| `MOD` + `,` / `.` | Focus prev / next monitor | -| `MOD` + `Shift` + `,` / `.` | Move window to prev / next monitor | -| `MOD` + `Shift` + `j` / `k` | Move in master stack | -| `MOD` + `Space` | Toggle floating | -| `MOD` + `Shift` + `Space` | Toggle all floating | -| `MOD` + `=` / `-` | Increase/Decrease gaps | -| `MOD` + `Shift` + `f` | Fullscreen toggle | -| `MOD` + `q` | Close focused window | -| `MOD` + `1-9` | Switch workspace 1–9 | -| `MOD` + `Shift` + `1-9` | Move window to WS 1–9 | - -### Programs - -| Combo | Action | Program | -| -------------------- | ---------- | ---------- | -| `MOD` + `Return` | Terminal | `st` | -| `MOD` + `b` | Browser | `firefox` | -| `MOD` + `p` | Launcher | `dmenu_run`| +| 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 mode | +| `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` | --- |
