tony / oxwm

Updated for commit message requests and added floating (normie layout) and bind to toggle layouts. Browse files
tonybtw committed 2025-10-25 parent e4329b5 commit 033558201a17bc90a9ea468003e4fb5de375960b
Showing 10 changed files with 239 additions and 73 deletions. UnifiedSplit
+1 −1 Cargo.lock
@@ -222,7 +222,7 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
222 222
223 [[package]] 223 [[package]]
224 name = "oxwm" 224 name = "oxwm"
225 -version = "0.2.0" 225 +version = "0.3.0"
226 dependencies = [ 226 dependencies = [
227 "anyhow", 227 "anyhow",
228 "chrono", 228 "chrono",
+2 −0 src/keyboard/handlers.rs
@@ -19,6 +19,8 @@ pub enum KeyAction {
19 ToggleGaps, 19 ToggleGaps,
20 ToggleFullScreen, 20 ToggleFullScreen,
21 ToggleFloating, 21 ToggleFloating,
22 + ChangeLayout,
23 + CycleLayout,
22 MoveToTag, 24 MoveToTag,
23 FocusMonitor, 25 FocusMonitor,
24 None, 26 None,
+22 −0 src/layout/mod.rs
@@ -1,3 +1,4 @@
1 +pub mod normie;
1 pub mod tiling; 2 pub mod tiling;
2 3
3 use x11rb::protocol::xproto::Window; 4 use x11rb::protocol::xproto::Window;
@@ -9,6 +10,26 @@ pub struct GapConfig {
9 pub outer_vertical: u32, 10 pub outer_vertical: u32,
10 } 11 }
11 12
13 +pub const TILING: &str = "tiling";
14 +pub const NORMIE: &str = "normie";
15 +pub const FLOATING: &str = "floating";
16 +
17 +pub fn layout_from_str(s: &str) -> Result<Box<dyn Layout>, String> {
18 + match s.to_lowercase().as_str() {
19 + TILING => Ok(Box::new(tiling::TilingLayout)),
20 + NORMIE | FLOATING => Ok(Box::new(normie::NormieLayout)),
21 + _ => Err(format!("Unknown layout: {}", s)),
22 + }
23 +}
24 +
25 +pub fn next_layout(current_name: &str) -> &'static str {
26 + match current_name {
27 + TILING => NORMIE,
28 + NORMIE => TILING,
29 + _ => TILING,
30 + }
31 +}
32 +
12 pub trait Layout { 33 pub trait Layout {
13 fn arrange( 34 fn arrange(
14 &self, 35 &self,
@@ -17,6 +38,7 @@ pub trait Layout {
17 screen_height: u32, 38 screen_height: u32,
18 gaps: &GapConfig, 39 gaps: &GapConfig,
19 ) -> Vec<WindowGeometry>; 40 ) -> Vec<WindowGeometry>;
41 + fn name(&self) -> &'static str;
20 } 42 }
21 43
22 pub struct WindowGeometry { 44 pub struct WindowGeometry {
+43 −0 src/layout/normie.rs new file mode 100644
@@ -0,0 +1,43 @@
1 +use super::{GapConfig, Layout, WindowGeometry};
2 +use x11rb::protocol::xproto::Window;
3 +
4 +pub struct NormieLayout;
5 +
6 +impl Layout for NormieLayout {
7 + fn name(&self) -> &'static str {
8 + super::NORMIE
9 + }
10 +
11 + fn arrange(
12 + &self,
13 + windows: &[Window],
14 + screen_width: u32,
15 + screen_height: u32,
16 + _gaps: &GapConfig,
17 + ) -> Vec<WindowGeometry> {
18 + // Floating layout: all windows open centered with a reasonable default size
19 + // This mimics dwm's NULL layout behavior where windows float freely
20 + const DEFAULT_WIDTH_RATIO: f32 = 0.6;
21 + const DEFAULT_HEIGHT_RATIO: f32 = 0.6;
22 +
23 + windows
24 + .iter()
25 + .map(|_| {
26 + // Calculate default window dimensions (60% of screen)
27 + let width = ((screen_width as f32) * DEFAULT_WIDTH_RATIO) as u32;
28 + let height = ((screen_height as f32) * DEFAULT_HEIGHT_RATIO) as u32;
29 +
30 + // Center the window on the screen
31 + let x = ((screen_width - width) / 2) as i32;
32 + let y = ((screen_height - height) / 2) as i32;
33 +
34 + WindowGeometry {
35 + x_coordinate: x,
36 + y_coordinate: y,
37 + width,
38 + height,
39 + }
40 + })
41 + .collect()
42 + }
43 +}
+4 −0 src/layout/tiling.rs
@@ -4,6 +4,10 @@ use x11rb::protocol::xproto::Window;
4 pub struct TilingLayout; 4 pub struct TilingLayout;
5 5
6 impl Layout for TilingLayout { 6 impl Layout for TilingLayout {
7 + fn name(&self) -> &'static str {
8 + super::TILING
9 + }
10 +
7 fn arrange( 11 fn arrange(
8 &self, 12 &self,
9 windows: &[Window], 13 windows: &[Window],
+1 −0 src/lib.rs
@@ -99,6 +99,7 @@ impl Default for Config {
99 ]), 99 ]),
100 ), 100 ),
101 Key::new(vec![MODKEY], keycodes::Q, KeyAction::KillClient, Arg::None), 101 Key::new(vec![MODKEY], keycodes::Q, KeyAction::KillClient, Arg::None),
102 + Key::new(vec![MODKEY], keycodes::N, KeyAction::CycleLayout, Arg::None),
102 Key::new( 103 Key::new(
103 vec![MODKEY, SHIFT], 104 vec![MODKEY, SHIFT],
104 keycodes::F, 105 keycodes::F,
+57 −43 src/monitor.rs
@@ -40,56 +40,70 @@ pub fn detect_monitors(
40 screen: &Screen, 40 screen: &Screen,
41 _root: Window, 41 _root: Window,
42 ) -> WmResult<Vec<Monitor>> { 42 ) -> WmResult<Vec<Monitor>> {
43 - let mut monitors = Vec::new(); 43 + let fallback_monitors = || {
44 - 44 + vec![Monitor::new(
45 - if let Ok(cookie) = connection.xinerama_is_active() { 45 + 0,
46 - if let Ok(reply) = cookie.reply() { 46 + 0,
47 - if reply.state != 0 { 47 + screen.width_in_pixels as u32,
48 - if let Ok(screens_cookie) = connection.xinerama_query_screens() { 48 + screen.height_in_pixels as u32,
49 - if let Ok(screens_reply) = screens_cookie.reply() { 49 + )]
50 - for screen_info in &screens_reply.screen_info { 50 + };
51 - if screen_info.width == 0 || screen_info.height == 0 { 51 +
52 - continue; 52 + let mut monitors = Vec::<Monitor>::new();
53 - } 53 +
54 - 54 + let xinerama_active = connection
55 - let is_unique = !monitors.iter().any(|m: &Monitor| { 55 + .xinerama_is_active()
56 - m.x == screen_info.x_org as i32 56 + .ok()
57 - && m.y == screen_info.y_org as i32 57 + .and_then(|cookie| cookie.reply().ok())
58 - && m.width == screen_info.width as u32 58 + .map_or(false, |reply| reply.state != 0);
59 - && m.height == screen_info.height as u32 59 +
60 - }); 60 + if xinerama_active {
61 - 61 + let xinerama_cookie = match connection.xinerama_query_screens() {
62 - if is_unique { 62 + Ok(cookie) => cookie,
63 - monitors.push(Monitor::new( 63 + Err(_) => return Ok(fallback_monitors()),
64 - screen_info.x_org as i32, 64 + };
65 - screen_info.y_org as i32, 65 +
66 - screen_info.width as u32, 66 + let xinerama_reply = match xinerama_cookie.reply() {
67 - screen_info.height as u32, 67 + Ok(reply) => reply,
68 - )); 68 + Err(_) => return Ok(fallback_monitors()),
69 - } 69 + };
70 - } 70 +
71 - } 71 + for screen_info in &xinerama_reply.screen_info {
72 - } 72 + let has_valid_dimensions = screen_info.width > 0 && screen_info.height > 0;
73 + if !has_valid_dimensions {
74 + continue;
75 + }
76 +
77 + let x_position = screen_info.x_org as i32;
78 + let y_position = screen_info.y_org as i32;
79 + let width_in_pixels = screen_info.width as u32;
80 + let height_in_pixels = screen_info.height as u32;
81 +
82 + let is_duplicate_monitor = monitors.iter().any(|monitor| {
83 + monitor.x == x_position
84 + && monitor.y == y_position
85 + && monitor.width == width_in_pixels
86 + && monitor.height == height_in_pixels
87 + });
88 +
89 + if !is_duplicate_monitor {
90 + monitors.push(Monitor::new(
91 + x_position,
92 + y_position,
93 + width_in_pixels,
94 + height_in_pixels,
95 + ));
73 } 96 }
74 } 97 }
75 } 98 }
76 99
77 if monitors.is_empty() { 100 if monitors.is_empty() {
78 - monitors.push(Monitor::new( 101 + monitors = fallback_monitors();
79 - 0,
80 - 0,
81 - screen.width_in_pixels as u32,
82 - screen.height_in_pixels as u32,
83 - ));
84 } 102 }
85 103
86 - monitors.sort_by(|a, b| { 104 + monitors.sort_by(|a, b| match a.y.cmp(&b.y) {
87 - let y_cmp = a.y.cmp(&b.y); 105 + std::cmp::Ordering::Equal => a.x.cmp(&b.x),
88 - if y_cmp == std::cmp::Ordering::Equal { 106 + other => other,
89 - a.x.cmp(&b.x)
90 - } else {
91 - y_cmp
92 - }
93 }); 107 });
94 108
95 Ok(monitors) 109 Ok(monitors)
+104 −29 src/window_manager.rs
@@ -3,8 +3,8 @@ use crate::bar::Bar;
3 use crate::errors::WmError; 3 use crate::errors::WmError;
4 use crate::keyboard::{self, Arg, KeyAction, handlers}; 4 use crate::keyboard::{self, Arg, KeyAction, handlers};
5 use crate::layout::GapConfig; 5 use crate::layout::GapConfig;
6 -use crate::layout::Layout;
7 use crate::layout::tiling::TilingLayout; 6 use crate::layout::tiling::TilingLayout;
7 +use crate::layout::{Layout, layout_from_str, next_layout};
8 use crate::monitor::{Monitor, detect_monitors}; 8 use crate::monitor::{Monitor, detect_monitors};
9 use std::collections::HashSet; 9 use std::collections::HashSet;
10 use x11rb::cursor::Handle as CursorHandle; 10 use x11rb::cursor::Handle as CursorHandle;
@@ -37,10 +37,7 @@ impl AtomCache {
37 .reply()? 37 .reply()?
38 .atom; 38 .atom;
39 39
40 - let wm_state = connection 40 + let wm_state = connection.intern_atom(false, b"WM_STATE")?.reply()?.atom;
41 - .intern_atom(false, b"WM_STATE")?
42 - .reply()?
43 - .atom;
44 41
45 Ok(Self { 42 Ok(Self {
46 net_current_desktop, 43 net_current_desktop,
@@ -128,12 +125,7 @@ impl WindowManager {
128 u16::from(config.modkey).into(), 125 u16::from(config.modkey).into(),
129 )?; 126 )?;
130 127
131 - let mut monitors = detect_monitors(&connection, &screen, root)?; 128 + let monitors = detect_monitors(&connection, &screen, root)?;
132 -
133 - let selected_tags = Self::get_saved_selected_tags(&connection, root, config.tags.len())?;
134 - if !monitors.is_empty() {
135 - monitors[0].selected_tags = selected_tags;
136 - }
137 129
138 let display = unsafe { x11::xlib::XOpenDisplay(std::ptr::null()) }; 130 let display = unsafe { x11::xlib::XOpenDisplay(std::ptr::null()) };
139 if display.is_null() { 131 if display.is_null() {
@@ -308,7 +300,11 @@ impl WindowManager {
308 } 300 }
309 } 301 }
310 302
311 - Ok(self.monitors.get(self.selected_monitor).map(|m| m.selected_tags).unwrap_or(tag_mask(0))) 303 + Ok(self
304 + .monitors
305 + .get(self.selected_monitor)
306 + .map(|m| m.selected_tags)
307 + .unwrap_or(tag_mask(0)))
312 } 308 }
313 309
314 fn save_client_tag(&self, window: Window, tag: TagMask) -> WmResult<()> { 310 fn save_client_tag(&self, window: Window, tag: TagMask) -> WmResult<()> {
@@ -376,7 +372,11 @@ impl WindowManager {
376 } 372 }
377 373
378 fn toggle_floating(&mut self) -> WmResult<()> { 374 fn toggle_floating(&mut self) -> WmResult<()> {
379 - if let Some(focused) = self.monitors.get(self.selected_monitor).and_then(|m| m.focused_window) { 375 + if let Some(focused) = self
376 + .monitors
377 + .get(self.selected_monitor)
378 + .and_then(|m| m.focused_window)
379 + {
380 if self.floating_windows.contains(&focused) { 380 if self.floating_windows.contains(&focused) {
381 self.floating_windows.remove(&focused); 381 self.floating_windows.remove(&focused);
382 self.apply_layout()?; 382 self.apply_layout()?;
@@ -385,9 +385,10 @@ impl WindowManager {
385 let float_height = (self.screen.height_in_pixels / 2) as u32; 385 let float_height = (self.screen.height_in_pixels / 2) as u32;
386 386
387 let border_width = self.config.border_width; 387 let border_width = self.config.border_width;
388 - 388 +
389 - let center_width = ((self.screen.width_in_pixels - float_width as u16)/2) as i32; 389 + let center_width = ((self.screen.width_in_pixels - float_width as u16) / 2) as i32;
390 - let center_height = ((self.screen.height_in_pixels - float_height as u16)/2) as i32; 390 + let center_height =
391 + ((self.screen.height_in_pixels - float_height as u16) / 2) as i32;
391 392
392 self.connection.configure_window( 393 self.connection.configure_window(
393 focused, 394 focused,
@@ -409,7 +410,11 @@ impl WindowManager {
409 } 410 }
410 411
411 fn toggle_fullscreen(&mut self) -> WmResult<()> { 412 fn toggle_fullscreen(&mut self) -> WmResult<()> {
412 - if let Some(focused) = self.monitors.get(self.selected_monitor).and_then(|m| m.focused_window) { 413 + if let Some(focused) = self
414 + .monitors
415 + .get(self.selected_monitor)
416 + .and_then(|m| m.focused_window)
417 + {
413 if self.fullscreen_window == Some(focused) { 418 if self.fullscreen_window == Some(focused) {
414 self.fullscreen_window = None; 419 self.fullscreen_window = None;
415 420
@@ -458,7 +463,14 @@ impl WindowManager {
458 463
459 let draw_blocks = monitor_index == self.selected_monitor; 464 let draw_blocks = monitor_index == self.selected_monitor;
460 bar.invalidate(); 465 bar.invalidate();
461 - bar.draw(&self.connection, &self.font, self.display, monitor.selected_tags, occupied_tags, draw_blocks)?; 466 + bar.draw(
467 + &self.connection,
468 + &self.font,
469 + self.display,
470 + monitor.selected_tags,
471 + occupied_tags,
472 + draw_blocks,
473 + )?;
462 } 474 }
463 } 475 }
464 Ok(()) 476 Ok(())
@@ -468,7 +480,11 @@ impl WindowManager {
468 match action { 480 match action {
469 KeyAction::Spawn => handlers::handle_spawn_action(action, arg)?, 481 KeyAction::Spawn => handlers::handle_spawn_action(action, arg)?,
470 KeyAction::KillClient => { 482 KeyAction::KillClient => {
471 - if let Some(focused) = self.monitors.get(self.selected_monitor).and_then(|m| m.focused_window) { 483 + if let Some(focused) = self
484 + .monitors
485 + .get(self.selected_monitor)
486 + .and_then(|m| m.focused_window)
487 + {
472 match self.connection.kill_client(focused) { 488 match self.connection.kill_client(focused) {
473 Ok(_) => { 489 Ok(_) => {
474 self.connection.flush()?; 490 self.connection.flush()?;
@@ -482,6 +498,28 @@ impl WindowManager {
482 KeyAction::ToggleFullScreen => { 498 KeyAction::ToggleFullScreen => {
483 self.toggle_fullscreen()?; 499 self.toggle_fullscreen()?;
484 } 500 }
501 + KeyAction::ChangeLayout => {
502 + if let Arg::Str(layout_name) = arg {
503 + match layout_from_str(layout_name) {
504 + Ok(layout) => {
505 + self.layout = layout;
506 + self.apply_layout()?;
507 + }
508 + Err(e) => eprintln!("Failed to change layout: {}", e),
509 + }
510 + }
511 + }
512 + KeyAction::CycleLayout => {
513 + let current_name = self.layout.name();
514 + let next_name = next_layout(current_name);
515 + match layout_from_str(next_name) {
516 + Ok(layout) => {
517 + self.layout = layout;
518 + self.apply_layout()?;
519 + }
520 + Err(e) => eprintln!("Failed to cycle layout: {}", e),
521 + }
522 + }
485 KeyAction::ToggleFloating => { 523 KeyAction::ToggleFloating => {
486 self.toggle_floating()?; 524 self.toggle_floating()?;
487 } 525 }
@@ -645,7 +683,11 @@ impl WindowManager {
645 fn save_selected_tags(&self) -> WmResult<()> { 683 fn save_selected_tags(&self) -> WmResult<()> {
646 let net_current_desktop = self.atoms.net_current_desktop; 684 let net_current_desktop = self.atoms.net_current_desktop;
647 685
648 - let selected_tags = self.monitors.get(self.selected_monitor).map(|m| m.selected_tags).unwrap_or(tag_mask(0)); 686 + let selected_tags = self
687 + .monitors
688 + .get(self.selected_monitor)
689 + .map(|m| m.selected_tags)
690 + .unwrap_or(tag_mask(0));
649 let desktop = selected_tags.trailing_zeros(); 691 let desktop = selected_tags.trailing_zeros();
650 692
651 let bytes = (desktop as u32).to_ne_bytes(); 693 let bytes = (desktop as u32).to_ne_bytes();
@@ -668,7 +710,11 @@ impl WindowManager {
668 return Ok(()); 710 return Ok(());
669 } 711 }
670 712
671 - if let Some(focused) = self.monitors.get(self.selected_monitor).and_then(|m| m.focused_window) { 713 + if let Some(focused) = self
714 + .monitors
715 + .get(self.selected_monitor)
716 + .and_then(|m| m.focused_window)
717 + {
672 let mask = tag_mask(tag_index); 718 let mask = tag_mask(tag_index);
673 self.window_tags.insert(focused, mask); 719 self.window_tags.insert(focused, mask);
674 720
@@ -689,7 +735,10 @@ impl WindowManager {
689 return Ok(()); 735 return Ok(());
690 } 736 }
691 737
692 - let current = self.monitors.get(self.selected_monitor).and_then(|m| m.focused_window); 738 + let current = self
739 + .monitors
740 + .get(self.selected_monitor)
741 + .and_then(|m| m.focused_window);
693 742
694 let next_window = if let Some(current) = current { 743 let next_window = if let Some(current) = current {
695 if let Some(current_index) = visible.iter().position(|&w| w == current) { 744 if let Some(current_index) = visible.iter().position(|&w| w == current) {
@@ -726,7 +775,11 @@ impl WindowManager {
726 Ok(()) 775 Ok(())
727 } 776 }
728 777
729 - fn update_focus_visuals(&self, old_focused: Option<Window>, new_focused: Window) -> WmResult<()> { 778 + fn update_focus_visuals(
779 + &self,
780 + old_focused: Option<Window>,
781 + new_focused: Window,
782 + ) -> WmResult<()> {
730 if let Some(old_win) = old_focused { 783 if let Some(old_win) = old_focused {
731 if old_win != new_focused { 784 if old_win != new_focused {
732 self.connection.configure_window( 785 self.connection.configure_window(
@@ -894,11 +947,16 @@ impl WindowManager {
894 &ChangeWindowAttributesAux::new().event_mask(EventMask::ENTER_WINDOW), 947 &ChangeWindowAttributesAux::new().event_mask(EventMask::ENTER_WINDOW),
895 )?; 948 )?;
896 949
897 - let selected_tags = self.monitors.get(self.selected_monitor).map(|m| m.selected_tags).unwrap_or(tag_mask(0)); 950 + let selected_tags = self
951 + .monitors
952 + .get(self.selected_monitor)
953 + .map(|m| m.selected_tags)
954 + .unwrap_or(tag_mask(0));
898 955
899 self.windows.push(event.window); 956 self.windows.push(event.window);
900 self.window_tags.insert(event.window, selected_tags); 957 self.window_tags.insert(event.window, selected_tags);
901 - self.window_monitor.insert(event.window, self.selected_monitor); 958 + self.window_monitor
959 + .insert(event.window, self.selected_monitor);
902 self.set_wm_state(event.window, 1)?; 960 self.set_wm_state(event.window, 1)?;
903 let _ = self.save_client_tag(event.window, selected_tags); 961 let _ = self.save_client_tag(event.window, selected_tags);
904 962
@@ -929,7 +987,9 @@ impl WindowManager {
929 return Ok(None); 987 return Ok(None);
930 } 988 }
931 989
932 - if let Some(monitor_index) = self.get_monitor_at_point(event.root_x as i32, event.root_y as i32) { 990 + if let Some(monitor_index) =
991 + self.get_monitor_at_point(event.root_x as i32, event.root_y as i32)
992 + {
933 if monitor_index != self.selected_monitor { 993 if monitor_index != self.selected_monitor {
934 self.selected_monitor = monitor_index; 994 self.selected_monitor = monitor_index;
935 self.update_bar()?; 995 self.update_bar()?;
@@ -950,7 +1010,9 @@ impl WindowManager {
950 } 1010 }
951 } 1011 }
952 Event::ButtonPress(event) => { 1012 Event::ButtonPress(event) => {
953 - let is_bar_click = self.bars.iter() 1013 + let is_bar_click = self
1014 + .bars
1015 + .iter()
954 .enumerate() 1016 .enumerate()
955 .find(|(_, bar)| bar.window() == event.event); 1017 .find(|(_, bar)| bar.window() == event.event);
956 1018
@@ -1029,7 +1091,11 @@ impl WindowManager {
1029 .copied() 1091 .copied()
1030 .collect(); 1092 .collect();
1031 1093
1032 - let bar_height = self.bars.get(monitor_index).map(|b| b.height() as u32).unwrap_or(0); 1094 + let bar_height = self
1095 + .bars
1096 + .get(monitor_index)
1097 + .map(|b| b.height() as u32)
1098 + .unwrap_or(0);
1033 let usable_height = monitor.height.saturating_sub(bar_height); 1099 let usable_height = monitor.height.saturating_sub(bar_height);
1034 1100
1035 let geometries = self 1101 let geometries = self
@@ -1058,6 +1124,12 @@ impl WindowManager {
1058 Ok(()) 1124 Ok(())
1059 } 1125 }
1060 1126
1127 + pub fn change_layout<L: Layout + 'static>(&mut self, new_layout: L) -> WmResult<()> {
1128 + self.layout = Box::new(new_layout);
1129 + self.apply_layout()?;
1130 + Ok(())
1131 + }
1132 +
1061 fn remove_window(&mut self, window: Window) -> WmResult<()> { 1133 fn remove_window(&mut self, window: Window) -> WmResult<()> {
1062 let initial_count = self.windows.len(); 1134 let initial_count = self.windows.len();
1063 self.windows.retain(|&w| w != window); 1135 self.windows.retain(|&w| w != window);
@@ -1073,7 +1145,10 @@ impl WindowManager {
1073 } 1145 }
1074 1146
1075 if self.windows.len() < initial_count { 1147 if self.windows.len() < initial_count {
1076 - let focused = self.monitors.get(self.selected_monitor).and_then(|m| m.focused_window); 1148 + let focused = self
1149 + .monitors
1150 + .get(self.selected_monitor)
1151 + .and_then(|m| m.focused_window);
1077 if focused == Some(window) { 1152 if focused == Some(window) {
1078 let visible = self.visible_windows_on_monitor(self.selected_monitor); 1153 let visible = self.visible_windows_on_monitor(self.selected_monitor);
1079 if let Some(&new_win) = visible.last() { 1154 if let Some(&new_win) = visible.last() {
+2 −0 templates/config.ron
@@ -26,6 +26,8 @@
26 (modifiers: [Mod4], key: Q, action: KillClient), 26 (modifiers: [Mod4], key: Q, action: KillClient),
27 (modifiers: [Mod4, Shift], key: F, action: ToggleFullScreen), 27 (modifiers: [Mod4, Shift], key: F, action: ToggleFullScreen),
28 (modifiers: [Mod4, Shift], key: Space, action: ToggleFloating), 28 (modifiers: [Mod4, Shift], key: Space, action: ToggleFloating),
29 + (modifiers: [Mod4], key: F, action: ChangeLayout, arg: "normie"),
30 + (modifiers: [Mod4], key: C, action: ChangeLayout, arg: "tiling"),
29 (modifiers: [Mod4], key: A, action: ToggleGaps), 31 (modifiers: [Mod4], key: A, action: ToggleGaps),
30 (modifiers: [Mod4, Shift], key: Q, action: Quit), 32 (modifiers: [Mod4, Shift], key: Q, action: Quit),
31 (modifiers: [Mod4, Shift], key: R, action: Restart), 33 (modifiers: [Mod4, Shift], key: R, action: Restart),
+3 −0 test-config.ron
@@ -32,6 +32,9 @@
32 (modifiers: [Mod1], key: Q, action: KillClient), 32 (modifiers: [Mod1], key: Q, action: KillClient),
33 (modifiers: [Mod1, Shift], key: F, action: ToggleFullScreen), 33 (modifiers: [Mod1, Shift], key: F, action: ToggleFullScreen),
34 (modifiers: [Mod1, Shift], key: Space, action: ToggleFloating), 34 (modifiers: [Mod1, Shift], key: Space, action: ToggleFloating),
35 + (modifiers: [Mod1], key: F, action: ChangeLayout, arg: "normie"),
36 + (modifiers: [Mod1], key: C, action: ChangeLayout, arg: "tiling"),
37 + (modifiers: [Mod1], key: N, action: CycleLayout),
35 (modifiers: [Mod1], key: A, action: ToggleGaps), 38 (modifiers: [Mod1], key: A, action: ToggleGaps),
36 (modifiers: [Mod1, Shift], key: Q, action: Quit), 39 (modifiers: [Mod1, Shift], key: Q, action: Quit),
37 (modifiers: [Mod1, Shift], key: R, action: Restart), 40 (modifiers: [Mod1, Shift], key: R, action: Restart),