oxwm

https://git.tonybtw.com/oxwm.git git://git.tonybtw.com/oxwm.git

added fallback font

Commit
b9062ae7634116e95be205df85ce17f242ad52df
Parent
e84fe9f
Author
tonybtw <tonybtw@tonybtw.com>
Date
2025-10-06 03:34:46

Diff

diff --git a/src/config.rs b/src/config.rs
index 6c19067..0d5cc48 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -9,14 +9,14 @@ use x11rb::protocol::xproto::KeyButMask;
 pub const BORDER_WIDTH: u32 = 1;
 pub const BORDER_FOCUSED: u32 = 0x6dade3;
 pub const BORDER_UNFOCUSED: u32 = 0xbbbbbb;
-pub const FONT: &str = "JetBrainsMono Nerd Font:style=Bold:size=14";
+pub const FONT: &str = "JetBrainsMono Nerd Font:style=Bold:size=14,monospace:size=14";
 
 // ========================================
 // DEFAULTS
 // ========================================
 pub const TERMINAL: &str = "alacritty";
 pub const XCLOCK: &str = "xclock";
-pub const MODKEY: KeyButMask = KeyButMask::MOD1;
+pub const MODKEY: KeyButMask = KeyButMask::MOD4;
 
 // ========================================
 // BAR COLORS
@@ -63,7 +63,7 @@ pub const SCHEME_SELECTED: ColorScheme = ColorScheme {
 const SCREENSHOT_CMD: &[&str] = &[
     "sh",
     "-c",
-    "maim ~/screenshots/screenshot_$(date +%Y%m%d_%H%M%S).png",
+    "maim -s | xclip -selection clipboard -t image/png",
 ];
 
 const DMENU_CMD: &[&str] = &["sh", "-c", "dmenu_run -l 10"];
@@ -73,6 +73,7 @@ const DMENU_CMD: &[&str] = &["sh", "-c", "dmenu_run -l 10"];
 // ========================================
 pub const TAG_COUNT: usize = 9;
 pub const TAGS: [&str; TAG_COUNT] = ["1", "2", "3", "4", "5", "6", "7", "8", "9"];
+// pub const TAGS: [&str; TAG_COUNT] = ["", "󰊯", "", "", "󰙯", "󱇤", "", "󱘶", "󰧮"];
 
 // ========================================
 // KEYBINDINGS
diff --git a/src/keyboard/handlers.rs b/src/keyboard/handlers.rs
index b9deb25..e13a690 100644
--- a/src/keyboard/handlers.rs
+++ b/src/keyboard/handlers.rs
@@ -56,6 +56,8 @@ pub fn setup_keybinds(connection: &impl Connection, root: Window) -> Result<()>
     for keybinding in KEYBINDINGS {
         let modifier_mask = modifiers_to_mask(keybinding.modifiers);
 
+        println!("Grabbing key {} with mod {}", keybinding.key, modifier_mask);
+
         connection.grab_key(
             false,
             root,
diff --git a/src/window_manager.rs b/src/window_manager.rs
index 9fef61a..8148e70 100644
--- a/src/window_manager.rs
+++ b/src/window_manager.rs
@@ -482,7 +482,11 @@ impl WindowManager {
                 }
             }
             Event::KeyPress(event) => {
+                println!("━━━ KeyPress Event ━━━");
+                println!("Key code:     {}", event.detail);
+
                 let (action, arg) = keyboard::handle_key_press(event)?;
+                println!("  -> Matched action: {:?}", action);
 
                 match action {
                     KeyAction::Quit => return Ok(Some(false)),