diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 187 |
1 files changed, 87 insertions, 100 deletions
@@ -1,164 +1,151 @@ <div align="center"> - <img src="images/sxwm_logo.png" width="30%"> - <h4>High Performance</h4> - <h4>Easy Config</h4> + <img src="images/sxwm_logo.png" width="30%"> + <h2>sxwm</h2> + <b>Minimal. Fast. Configurable. Tiling Window Manager for X11</b> + <br> + <sub>By Abhinav Prasai (2025)</sub> + <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> -<details> -<summary><h2>Patch Notes</h2></summary> -### v1.1.1 -- **NEW**: *Xinerama Support*, *Can swap windows holding Mod + Shift + Dragging*. -- **FIXED**: New windows in `global_floating` mode will spawn in the middle. -</details> +--- -<a href="1"><img src="images/1.png" width="45%" align="right"></a> +## Features -Here we have a **minimal**, **tiling**, and **configurable** window manager. -- **Tiling & Floating**: Seamlessly switch between layouts. -- **Workspaces**: Workspaces work with your bar. -- **Bars work too**: BAR BAR BAR?! Why not try [sxbar](https://github.com/uint23/sxbar) -- **Lightweight**: Single C file plus a small header and config. -- **Easy Config**: All settings in `config`. -<br> +- **Tiling & Floating**: Switch seamlessly between layouts. +- **Workspaces**: 9 workspaces, fully integrated with your bar. +- **Live Config Reload**: Change your config and reload instantly with a keybind. +- **Easy Configuration**: Human-friendly `sxwmrc` file, no C required. +- **Master-Stack Layout**: Productive, DWM-inspired workflow. +- **Mouse Support**: Move, swap, resize, and focus windows with the mouse. +- **Zero Dependencies**: Only `libX11` and `Xinerama` required. +- **Lightweight**: Single C file, minimal headers, compiles in seconds. +- **Bar Friendly**: Works great with [sxbar](https://github.com/uint23/sxbar). +- **Xinerama Support**: Multi-monitor ready. +- **Fast**: Designed for speed and low resource usage. -<a href="2"><img src="images/2.png" width="45%" align="right"></a> +--- -- **Master-Stack**: Use the DWM native and super productive layout. -- **Keyboard-driven**: Full coverage via `MOD` + keys. -- **Mouse Support**: Focus under cursor, move, swap & resize with mouse. -- **Zero Dependencies**: Only requires `libX11`. -- **Compiles on a Toaster**: As long as it has a decently modern compiler. +## Screenshots + +<a href="1"><img src="images/1.png" width="50%" align="right"></a> +<a href="2"><img src="images/2.png" width="50%" align="right"></a> <br clear="right"> --- -## Default Configuration - -All options reside in `config` (which is just a header-file) with clear comments. -Keybindings are also easy to understand and quick to implement. -No more bindsym or C code -```c -CMD(terminal, "st"); -CMD(browser, "firefox"); +## Patch Notes -static const Binding binds[] = -{ -/*————< MODIFIER(S) >< KEY >—————< FUNCTION >——*/ - -/*———————< Here are your functions calls >————— — */ +<details> +<summary><strong>Click to expand</strong></summary> - CALL(MOD|SHIFT, e, quit), - CALL(MOD|SHIFT, q, close_focused), +#### v1.1.1 +- **NEW**: Xinerama support, swap windows with Mod + Shift + Drag. +- **FIXED**: New windows in `global_floating` mode spawn centered. - CALL(MOD, j, focus_next), - CALL(MOD, k, focus_prev), +</details> - CALL(MOD|SHIFT, j, move_master_next), - CALL(MOD|SHIFT, k, move_master_prev), +--- - CALL(MOD, equal, inc_gaps), - CALL(MOD, minus, dec_gaps), +## Default Configuration - CALL(MOD, space, toggle_floating), - CALL(MOD|SHIFT, space, toggle_floating_global), - ..... -``` +All options are in `sxwmrc` (which uses a simple DSL). +Keybindings are easy to read and edit. +No recompiling, no C code, just edit and reload! --- ## Default Keybindings -**Window Management** +### Window Management | Combo | Action | | ---------------------------- | ------------------------- | -| `Mouse` | Focus under cursor | -| `MOD` + `Left Mouse` | Move window by mouse | -| `MOD` + `Right Mouse` | Resize window by mouse | +| 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` + `Shift` + `j` / `k` | Move in master stack | | `MOD` + `Space` | Toggle floating | | `MOD` + `Shift` + `Space` | Toggle all floating | -| `MOD` + `=` / `-` | Inc/Dec gaps | +| `MOD` + `=` / `-` | Increase/Decrease gaps | | `MOD` + `f` | Fullscreen toggle | -| `MOD` + `c` | Center window | | `MOD` + `q` | Close focused window | | `MOD` + `1-9` | Switch workspace 1–9 | | `MOD` + `Shift` + `1-9` | Move window to WS 1–9 | -**Programs** +### Programs -| Combo | Action | Programs (by default) | -| -------------------- | ---------- | --------- | -| `MOD` + `Return` | Terminal | `st` | -| `MOD` + `b` | Browser | `firefox` | +| Combo | Action | Program | +| -------------------- | ---------- | ---------- | +| `MOD` + `Return` | Terminal | `st` | +| `MOD` + `b` | Browser | `firefox` | +| `MOD` + `p` | Launcher | `dmenu_run`| --- ## Dependencies -- `libX11` (Xorg client library) `Xinerama` (if you want multi-monitor support) -- GCC / Clang & Make +- `libX11` (Xorg client library) +- `Xinerama` +- GCC or Clang & Make --- -## Makefile Targets - -Below are the available `make` targets for streamlining common tasks: +## Build & Install -| Target | Description | -| ---------------- | ------------------------------------------------------------------- | -| `make` or `make all` | Compile the source files into the `sxwm` binary. | -| `make clean` | Remove object files (`*.o`) and build artifacts. | -| `make install` | Install `sxwm` to `$(PREFIX)/bin` (default `/usr/local/bin`). | -| `make uninstall` | Remove the installed binary from `$(PREFIX)/bin`. | -| `make clean install` | Runs `make clean` then `make install`. | +### Arch Linux (AUR) -> You can override the install directory by specifying `PREFIX` or `DESTDIR`, for example: -> ```sh -> make install PREFIX=$HOME/.local -> ``` - ---- +```sh +yay -S sxwm +``` -## Installation +### Build from Source -### Arch linux - AUR +```sh +git clone --depth=1 https://github.com/uint23/sxwm.git +cd sxwm/ +make +sudo make clean install +``` - ```bash - yay -S sxwm - ``` +### Run -### Build from source +Add to your `~/.xinitrc`: +```sh +exec sxwm +``` -1. **Clone repository** +--- - ```bash - git clone --depth=1 https://github.com/uint23/sxwm.git - cd sxwm/ - make - sudo make clean install - ``` +## Makefile Targets -2. **Run** +| Target | Description | +| --------------------- | --------------------------------------------------- | +| `make` / `make all` | Build the `sxwm` binary | +| `make clean` | Remove object files and build artifacts | +| `make install` | Install `sxwm` to `$(PREFIX)/bin` (default `/usr/local/bin`) | +| `make uninstall` | Remove the installed binary | +| `make clean install` | Clean and then install | - Add `sxwm` to `~/.xinitrc`: - ```bash - exec sxwm - ``` +> Override install directory with `PREFIX` or `DESTDIR`: +> ```sh +> make install PREFIX=$HOME/.local +> ``` --- ## Thanks & Inspiration -- [dwm](https://dwm.suckless.org) - Tiling & source code -- [i3](https://i3wm.org) - Making configuring easy -- [sowm](https://github.com/dylanaraps/sowm) - README inspo :) -- [tinywm](http://incise.org/tinywm.html) - idk, just cool to see how a wm works +- [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>Contributions welcome! Open issues or submit PRs.</em> -</p> +</p>
\ No newline at end of file |