tony / oxwm

fixed defaults and readme Browse files
tonybtw committed 2025-10-15 parent 5099cb0 commit 3b8534fe6bcceea7fb182cfcc2ecb92a0aaf10d7
Showing 4 changed files with 15 additions and 20 deletions. UnifiedSplit
+1 −1 default.nix
@@ -9,7 +9,7 @@
9 }: 9 }:
10 rustPlatform.buildRustPackage (finalAttrs: { 10 rustPlatform.buildRustPackage (finalAttrs: {
11 pname = "oxwm"; 11 pname = "oxwm";
12 - version = "0.1.0"; 12 + version = "0.1.12";
13 13
14 src = ./.; 14 src = ./.;
15 15
+8 −14 readme.org
@@ -81,13 +81,9 @@ Add this to your =configuration.nix=:
81 #+end_src 81 #+end_src
82 82
83 *** Initialize your config 83 *** Initialize your config
84 -After rebuilding your system with =sudo nixos-rebuild switch=, log in via your display manager, then run: 84 +After rebuilding your system with =sudo nixos-rebuild switch=, log in via your display manager.
85 85
86 -#+begin_src sh 86 +On first launch, your initial config file will be automatically created and placed in =~/.config/oxwm/config.ron=. Edit it and reload with =Mod+Shift+R=.
87 -oxwm --init
88 -#+end_src
89 -
90 -This creates your personal config at =~/.config/oxwm/config.rs=. Edit it and reload with =Mod+Shift+R=.
91 87
92 *** Advanced: Using a specific oxwm version 88 *** Advanced: Using a specific oxwm version
93 If you want to pin or customize the oxwm package: 89 If you want to pin or customize the oxwm package:
@@ -153,25 +149,23 @@ startx
153 If using a display manager (LightDM, GDM, SDDM), OXWM should appear in the session list after installation. 149 If using a display manager (LightDM, GDM, SDDM), OXWM should appear in the session list after installation.
154 150
155 * Configuration 151 * Configuration
156 -OXWM follows the suckless philosophy: configuration is done by editing =~/.config/oxwm/config.rs= and recompiling. 152 +OXWM was inspired by dwm, but ditched the suckless philosophy. This philosophy quite literally discourages users from using the software for the sake of 'elitism'. I find that quite nonsensical, so I went ahead and created this project to be user friendly. The configuration is done by editing =~/.config/oxwm/config.ron= and the binary can be reloaded with a hotkey (Super+Shift+R by efault).
157 -
158 -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.
159 153
160 -Edit =~/.config/oxwm/config.rs= to customize: 154 +Edit =~/.config/oxwm/config.ron= to customize:
161 - Keybindings 155 - Keybindings
162 - Colors and appearance 156 - Colors and appearance
163 - Status bar blocks 157 - Status bar blocks
164 - Gaps and borders 158 - Gaps and borders
165 - Terminal and applications 159 - Terminal and applications
166 160
167 -After making changes, reload OXWM with =Mod+Shift+R= (auto-recompiles if needed). 161 +After making changes, reload OXWM with =Mod+Shift+R=
168 162
169 * Contributing 163 * Contributing
170 When contributing to OXWM: 164 When contributing to OXWM:
171 165
172 -1. Never commit your personal =~/.config/oxwm/config.rs= 166 +1. Never commit your personal =~/.config/oxwm/config.ron=
173 -2. Only modify =templates/config.rs= if adding new configuration options 167 +2. Only modify =templates/config.ron= if adding new configuration options
174 -3. Test your changes with =just test= using Xephyr 168 +3. Test your changes with =just test= using Xephyr/Xwayland
175 4. Document any new features or keybindings 169 4. Document any new features or keybindings
176 170
177 * Key Bindings 171 * Key Bindings
+3 −2 src/lib.rs
@@ -91,7 +91,7 @@ impl Default for Config {
91 &[MODKEY], 91 &[MODKEY],
92 keycodes::D, 92 keycodes::D,
93 KeyAction::Spawn, 93 KeyAction::Spawn,
94 - Arg::Array(&["sh", "-c", "dmenu_run"]), 94 + Arg::Array(&["sh", "-c", "dmenu_run -l 10"]),
95 ), 95 ),
96 Key::new(&[MODKEY], keycodes::Q, KeyAction::KillClient, Arg::None), 96 Key::new(&[MODKEY], keycodes::Q, KeyAction::KillClient, Arg::None),
97 Key::new( 97 Key::new(
@@ -103,6 +103,7 @@ impl Default for Config {
103 Key::new(&[MODKEY], keycodes::A, KeyAction::ToggleGaps, Arg::None), 103 Key::new(&[MODKEY], keycodes::A, KeyAction::ToggleGaps, Arg::None),
104 Key::new(&[MODKEY, SHIFT], keycodes::Q, KeyAction::Quit, Arg::None), 104 Key::new(&[MODKEY, SHIFT], keycodes::Q, KeyAction::Quit, Arg::None),
105 Key::new(&[MODKEY, SHIFT], keycodes::R, KeyAction::Restart, Arg::None), 105 Key::new(&[MODKEY, SHIFT], keycodes::R, KeyAction::Restart, Arg::None),
106 + Key::new(&[MODKEY], keycodes::F, KeyAction::ToggleFloating, Arg::None),
106 Key::new(&[MODKEY], keycodes::J, KeyAction::FocusStack, Arg::Int(-1)), 107 Key::new(&[MODKEY], keycodes::J, KeyAction::FocusStack, Arg::Int(-1)),
107 Key::new(&[MODKEY], keycodes::K, KeyAction::FocusStack, Arg::Int(1)), 108 Key::new(&[MODKEY], keycodes::K, KeyAction::FocusStack, Arg::Int(1)),
108 Key::new(&[MODKEY], keycodes::KEY_1, KeyAction::ViewTag, Arg::Int(0)), 109 Key::new(&[MODKEY], keycodes::KEY_1, KeyAction::ViewTag, Arg::Int(0)),
@@ -170,7 +171,7 @@ impl Default for Config {
170 ), 171 ),
171 ], 172 ],
172 status_blocks: vec![crate::bar::BlockConfig { 173 status_blocks: vec![crate::bar::BlockConfig {
173 - format: " {}", 174 + format: "{}",
174 command: crate::bar::BlockCommand::DateTime("%a, %b %d - %-I:%M %P"), 175 command: crate::bar::BlockCommand::DateTime("%a, %b %d - %-I:%M %P"),
175 interval_secs: 1, 176 interval_secs: 1,
176 color: 0x0db9d7, 177 color: 0x0db9d7,
+3 −3 templates/config.ron
@@ -52,11 +52,11 @@
52 ], 52 ],
53 53
54 status_blocks: [ 54 status_blocks: [
55 - (format: "󰍛 {used}/{total} GB", command: "Ram", interval_secs: 5, color: 0x7aa2f7, underline: true), 55 + (format: "Ram: {used}/{total} GB", command: "Ram", interval_secs: 5, color: 0x7aa2f7, underline: true),
56 (format: " │ ", command: "Static", interval_secs: 18446744073709551615, color: 0xa9b1d6, underline: false), 56 (format: " │ ", command: "Static", interval_secs: 18446744073709551615, color: 0xa9b1d6, underline: false),
57 - (format: " {}", command: "Shell", command_arg: "uname -r", interval_secs: 18446744073709551615, color: 0xf7768e, underline: true), 57 + (format: "Kernel: {}", command: "Shell", command_arg: "uname -r", interval_secs: 18446744073709551615, color: 0xf7768e, underline: true),
58 (format: " │ ", command: "Static", interval_secs: 18446744073709551615, color: 0xa9b1d6, underline: false), 58 (format: " │ ", command: "Static", interval_secs: 18446744073709551615, color: 0xa9b1d6, underline: false),
59 - (format: "󰸘 {}", command: "DateTime", command_arg: "%a, %b %d - %-I:%M %P", interval_secs: 1, color: 0x0db9d7, underline: true), 59 + (format: "{}", command: "DateTime", command_arg: "%a, %b %d - %-I:%M %P", interval_secs: 1, color: 0x0db9d7, underline: true),
60 ], 60 ],
61 61
62 scheme_normal: (foreground: 0xbbbbbb, background: 0x1a1b26, underline: 0x444444), 62 scheme_normal: (foreground: 0xbbbbbb, background: 0x1a1b26, underline: 0x444444),