README.txt 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. 2zw
  2. ===
  3. 2zw is a fast, lean window manager for X written in Zig.
  4. It follows the 2wm design from suckless.org but is reworked in Zig for type safety while keeping the same minimalist behaviour.
  5. The codebase now targets portable POSIX APIs so it builds cleanly on both Linux and OpenBSD.
  6. Features
  7. --------
  8. - Small hackable codebase (~1.8k LOC)
  9. - Master/stack tiling
  10. - Attach/detach instead of workspaces
  11. - No configuration file parsing, configured via source
  12. - Floating window support
  13. - Focus border colouring
  14. - Bar (bat, date/time)
  15. - Only depends on X11 and Zig std
  16. - Client state stored in contiguous arrays for better cache use
  17. Requirements
  18. ------------
  19. In order to build 2zw you need:
  20. - Zig compiler (0.13.0 or newer, tested with 0.14.0)
  21. - Xlib header files
  22. - libX11-dev
  23. - libXrandr-dev
  24. - On OpenBSD these live under `/usr/X11R6`; the build script adds the paths automatically.
  25. Installation
  26. ------------
  27. Edit `build.zig` to match your local setup if you want a different prefix
  28. (2zw installs into `/usr/local` namespace by default). No manual edits are required
  29. for OpenBSD include/library search paths.
  30. Afterwards enter the following command to build and install 2zw:
  31. zig build install
  32. Running 2zw
  33. -----------
  34. Add the following line to your .xinitrc to start 2zw using startx:
  35. exec 2zw
  36. In order to connect 2zw to a specific display, make sure that
  37. the DISPLAY environment variable is set correctly, e.g.:
  38. DISPLAY=foo.bar:1 exec 2zw
  39. Configuration
  40. -------------
  41. Everything lives in `src/main.zig`; edit constants and rebuild.
  42. Defaults worth noting:
  43. - `FOCUS_BORDER_COLOR = 0xffd787`
  44. - `NORMAL_BORDER_COLOR = 0x333333`
  45. - `BORDER_WIDTH = 2`
  46. - `terminal = "st"`
  47. - `launcher = "dmenu_run"`
  48. Key bindings (Mod4): q kill, a attach, d detach, , prev, . next, Return terminal, p launcher, s slock.