| @@ -4,6 +4,7 @@ |
| 4 |
* Table of Contents :toc: |
4 |
* Table of Contents :toc: |
| 5 |
- [[#oxwm][OXWM]] |
5 |
- [[#oxwm][OXWM]] |
| 6 |
- [[#installation][Installation]] |
6 |
- [[#installation][Installation]] |
|
|
7 |
+ - [[#nixos-with-flakes][NixOS (with Flakes)]] |
| 7 |
- [[#arch-linux][Arch Linux]] |
8 |
- [[#arch-linux][Arch Linux]] |
| 8 |
- [[#building-from-source][Building from Source]] |
9 |
- [[#building-from-source][Building from Source]] |
| 9 |
- [[#setting-up-oxwm][Setting up OXWM]] |
10 |
- [[#setting-up-oxwm][Setting up OXWM]] |
| @@ -24,6 +25,88 @@ philosophy of *"edit + recompile."*, but with sane defaults and no arbitrary eli |
| 24 |
enforcing bad variable names and bad file structure topology. |
25 |
enforcing bad variable names and bad file structure topology. |
| 25 |
|
26 |
|
| 26 |
* Installation |
27 |
* Installation |
|
|
28 |
+** NixOS (with Flakes) |
|
|
29 |
+ |
|
|
30 |
+*** Adding OXWM to your flake inputs |
|
|
31 |
+Add oxwm to your =flake.nix= inputs: |
|
|
32 |
+ |
|
|
33 |
+#+begin_src nix |
|
|
34 |
+{ |
|
|
35 |
+ inputs = { |
|
|
36 |
+ nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; |
|
|
37 |
+ oxwm.url = "github:tonybanters/oxwm"; |
|
|
38 |
+ oxwm.inputs.nixpkgs.follows = "nixpkgs"; |
|
|
39 |
+ }; |
|
|
40 |
+ |
|
|
41 |
+ outputs = { self, nixpkgs, oxwm, ... }: { |
|
|
42 |
+ nixosConfigurations.yourhost = nixpkgs.lib.nixosSystem { |
|
|
43 |
+ system = "x86_64-linux"; |
|
|
44 |
+ modules = [ |
|
|
45 |
+ ./configuration.nix |
|
|
46 |
+ oxwm.nixosModules.default |
|
|
47 |
+ ]; |
|
|
48 |
+ }; |
|
|
49 |
+ }; |
|
|
50 |
+} |
|
|
51 |
+#+end_src |
|
|
52 |
+ |
|
|
53 |
+*** Enabling OXWM in configuration.nix |
|
|
54 |
+Add this to your =configuration.nix=: |
|
|
55 |
+ |
|
|
56 |
+#+begin_src nix |
|
|
57 |
+{ config, pkgs, ... }: |
|
|
58 |
+ |
|
|
59 |
+{ |
|
|
60 |
+ services.xserver = { |
|
|
61 |
+ enable = true; |
|
|
62 |
+ |
|
|
63 |
+ windowManager.oxwm.enable = true; |
|
|
64 |
+ }; |
|
|
65 |
+ |
|
|
66 |
+ # Recommended: Install a display manager |
|
|
67 |
+ services.xserver.displayManager.lightdm.enable = true; |
|
|
68 |
+ # Or use another display manager like sddm, gdm, etc. |
|
|
69 |
+} |
|
|
70 |
+#+end_src |
|
|
71 |
+ |
|
|
72 |
+*** Initialize your config |
|
|
73 |
+After rebuilding your system with =sudo nixos-rebuild switch=, log in via your display manager, then run: |
|
|
74 |
+ |
|
|
75 |
+#+begin_src sh |
|
|
76 |
+oxwm --init |
|
|
77 |
+#+end_src |
|
|
78 |
+ |
|
|
79 |
+This creates your personal config at =~/.config/oxwm/config.rs=. Edit it and reload with =Mod+Shift+R=. |
|
|
80 |
+ |
|
|
81 |
+*** Advanced: Using a specific oxwm version |
|
|
82 |
+If you want to pin or customize the oxwm package: |
|
|
83 |
+ |
|
|
84 |
+#+begin_src nix |
|
|
85 |
+{ |
|
|
86 |
+ services.xserver.windowManager.oxwm = { |
|
|
87 |
+ enable = true; |
|
|
88 |
+ # Use a specific version or build with custom options |
|
|
89 |
+ package = oxwm.packages.${pkgs.system}.default; |
|
|
90 |
+ }; |
|
|
91 |
+} |
|
|
92 |
+#+end_src |
|
|
93 |
+ |
|
|
94 |
+*** Development setup with Nix |
|
|
95 |
+For development, use the provided dev shell: |
|
|
96 |
+ |
|
|
97 |
+#+begin_src sh |
|
|
98 |
+# Clone the repository |
|
|
99 |
+git clone https://github.com/tonybanters/oxwm |
|
|
100 |
+cd oxwm |
|
|
101 |
+ |
|
|
102 |
+# Enter the development environment |
|
|
103 |
+nix develop |
|
|
104 |
+ |
|
|
105 |
+# Build and test |
|
|
106 |
+cargo build |
|
|
107 |
+just test |
|
|
108 |
+#+end_src |
|
|
109 |
+ |
| 27 |
** Arch Linux |
110 |
** Arch Linux |
| 28 |
Install dependencies: |
111 |
Install dependencies: |
| 29 |
#+begin_src sh |
112 |
#+begin_src sh |
| @@ -44,6 +127,7 @@ just install |
| 44 |
#+end_src |
127 |
#+end_src |
| 45 |
|
128 |
|
| 46 |
** Setting up OXWM |
129 |
** Setting up OXWM |
|
|
130 |
+*** Without a display manager (startx) |
| 47 |
Add the following to your =~/.xinitrc=: |
131 |
Add the following to your =~/.xinitrc=: |
| 48 |
#+begin_src sh |
132 |
#+begin_src sh |
| 49 |
exec oxwm |
133 |
exec oxwm |
| @@ -54,35 +138,28 @@ Then start X with: |
| 54 |
startx |
138 |
startx |
| 55 |
#+end_src |
139 |
#+end_src |
| 56 |
|
140 |
|
|
|
141 |
+*** With a display manager |
|
|
142 |
+If using a display manager (LightDM, GDM, SDDM), OXWM should appear in the session list after installation. |
|
|
143 |
+ |
| 57 |
* Configuration |
144 |
* Configuration |
| 58 |
-OXWM follows the suckless philosophy: configuration is done by editing =src/config.rs= and recompiling. |
145 |
+OXWM follows the suckless philosophy: configuration is done by editing =~/.config/oxwm/config.rs= and recompiling. |
| 59 |
|
146 |
|
| 60 |
-On first build, =config.rs= is automatically created from =src/default_config.rs=. Your =config.rs= is gitignored, so you can customize it without worrying about merge conflicts. |
147 |
+On first run with =oxwm --init=, your config is automatically created from the template. Your =config.rs= is gitignored, so you can customize it without worrying about merge conflicts. |
| 61 |
|
148 |
|
| 62 |
-To reset your config to defaults: |
149 |
+Edit =~/.config/oxwm/config.rs= to customize: |
| 63 |
-#+begin_src sh |
|
|
| 64 |
-just reset-config |
|
|
| 65 |
-#+end_src |
|
|
| 66 |
- |
|
|
| 67 |
-Edit =src/config.rs= to customize: |
|
|
| 68 |
- Keybindings |
150 |
- Keybindings |
| 69 |
- Colors and appearance |
151 |
- Colors and appearance |
| 70 |
- Status bar blocks |
152 |
- Status bar blocks |
| 71 |
- Gaps and borders |
153 |
- Gaps and borders |
| 72 |
- Terminal and applications |
154 |
- Terminal and applications |
| 73 |
|
155 |
|
| 74 |
-After making changes: |
156 |
+After making changes, reload OXWM with =Mod+Shift+R= (auto-recompiles if needed). |
| 75 |
-#+begin_src sh |
|
|
| 76 |
-just install |
|
|
| 77 |
-#+end_src |
|
|
| 78 |
- |
|
|
| 79 |
-Then reload OXWM with Alt+Shift+R. |
|
|
| 80 |
|
157 |
|
| 81 |
* Contributing |
158 |
* Contributing |
| 82 |
When contributing to OXWM: |
159 |
When contributing to OXWM: |
| 83 |
|
160 |
|
| 84 |
-1. Never commit your personal =src/config.rs= (it's gitignored) |
161 |
+1. Never commit your personal =~/.config/oxwm/config.rs= |
| 85 |
-2. Only modify =src/default_config.rs= if adding new configuration options |
162 |
+2. Only modify =templates/config.rs= if adding new configuration options |
| 86 |
3. Test your changes with =just test= using Xephyr |
163 |
3. Test your changes with =just test= using Xephyr |
| 87 |
4. Document any new features or keybindings |
164 |
4. Document any new features or keybindings |
| 88 |
|
165 |
|
| @@ -91,17 +168,17 @@ Default keybindings (customizable in config.rs): |
| 91 |
|
168 |
|
| 92 |
| Binding | Action | |
169 |
| Binding | Action | |
| 93 |
|-----------------+-------------------------| |
170 |
|-----------------+-------------------------| |
| 94 |
-| Alt+Return | Spawn terminal | |
171 |
+| Super+Return | Spawn terminal | |
| 95 |
-| Alt+J/K | Cycle focus down/up | |
172 |
+| Super+J/K | Cycle focus down/up | |
| 96 |
-| Alt+Q | Kill focused window | |
173 |
+| Super+Q | Kill focused window | |
| 97 |
-| Alt+Shift+Q | Quit WM | |
174 |
+| Super+Shift+Q | Quit WM | |
| 98 |
-| Alt+Shift+R | Hot reload WM | |
175 |
+| Super+Shift+R | Hot reload WM | |
| 99 |
-| Alt+1-9 | View tag 1-9 | |
176 |
+| Super+1-9 | View tag 1-9 | |
| 100 |
-| Alt+Shift+1-9 | Move window to tag 1-9 | |
177 |
+| Super+Shift+1-9 | Move window to tag 1-9 | |
| 101 |
-| Alt+S | Screenshot (maim) | |
178 |
+| Super+S | Screenshot (maim) | |
| 102 |
-| Alt+D | dmenu launcher | |
179 |
+| Super+D | dmenu launcher | |
| 103 |
-| Alt+A | Toggle gaps | |
180 |
+| Super+A | Toggle gaps | |
| 104 |
-| Alt+Shift+F | Toggle fullscreen | |
181 |
+| Super+Shift+F | Toggle fullscreen | |
| 105 |
|
182 |
|
| 106 |
* Features |
183 |
* Features |
| 107 |
- Dynamic tiling layout with master/stack |
184 |
- Dynamic tiling layout with master/stack |
| @@ -217,7 +294,7 @@ src/ |
| 217 |
└── layout/ |
294 |
└── layout/ |
| 218 |
├── mod.rs [Layout trait definition] |
295 |
├── mod.rs [Layout trait definition] |
| 219 |
└── tiling.rs |
296 |
└── tiling.rs |
| 220 |
- └── TilingLayout::arrange() [Calculate window positions]c |
297 |
+ └── TilingLayout::arrange() [Calculate window positions] |
| 221 |
#+end_src |
298 |
#+end_src |
| 222 |
|
299 |
|
| 223 |
* Architecture Notes |
300 |
* Architecture Notes |
| @@ -251,3 +328,4 @@ The tiling layout divides the screen into a master area (left half) and stack ar |
| 251 |
|
328 |
|
| 252 |
* License |
329 |
* License |
| 253 |
[[https://www.gnu.org/licenses/gpl-3.0.en.html][GPL v3]] |
330 |
[[https://www.gnu.org/licenses/gpl-3.0.en.html][GPL v3]] |
|
|
331 |
+ |