tony / oxwm

Branch: c07ef11
Switch branches/tags
master
tonybtw keychords 2809716 2025-10-28
114 lines · 6 KB Raw Blame History
1 #![enable(implicit_some)]
2 // OXWM Configuration File
3 // Edit this file and reload with Mod+Shift+R (no compilation needed!)
4
5 (
6 border_width: 2,
7 border_focused: 0x6dade3,
8 border_unfocused: 0xbbbbbb,
9 font: "monospace:style=Bold:size=10",
10
11 gaps_enabled: true,
12 gap_inner_horizontal: 5,
13 gap_inner_vertical: 5,
14 gap_outer_horizontal: 5,
15 gap_outer_vertical: 5,
16
17 terminal: "st",
18 modkey: Mod4,
19
20 tags: ["1", "2", "3", "4", "5", "6", "7", "8", "9"],
21 layout_symbols: [
22 (name: "tiling", symbol: "[T]"),
23 (name: "normie", symbol: "[F]"),
24 ],
25
26 // Keybinding Format:
27 //
28 // New format (supports keychords - multi-key sequences):
29 // (keys: [(modifiers: [...], key: X), (modifiers: [...], key: Y)], action: ..., arg: ...)
30 //
31 // Old format (single key, backwards compatible):
32 // (modifiers: [...], key: X, action: ..., arg: ...)
33 //
34 // Examples:
35 // Single key: (keys: [(modifiers: [Mod4], key: Return)], action: Spawn, arg: "st")
36 // Keychord: (keys: [(modifiers: [Mod4], key: Space), (modifiers: [], key: F)], action: Spawn, arg: "firefox")
37 //
38 // You can cancel any in-progress keychord by pressing Escape.
39
40 keybindings: [
41 // Basic keybindings (old format for backwards compatibility)
42 (modifiers: [Mod4], key: Return, action: Spawn, arg: "st"),
43 (modifiers: [Mod4], key: D, action: Spawn, arg: ["sh", "-c", "dmenu_run -l 10"]),
44 (modifiers: [Mod4], key: S, action: Spawn, arg: ["sh", "-c", "maim -s | xclip -selection clipboard -t image/png"]),
45 (modifiers: [Mod4], key: Q, action: KillClient),
46 (modifiers: [Mod4, Shift], key: F, action: ToggleFullScreen),
47 (modifiers: [Mod4, Shift], key: Space, action: ToggleFloating),
48 (modifiers: [Mod4], key: F, action: ChangeLayout, arg: "normie"),
49 (modifiers: [Mod4], key: C, action: ChangeLayout, arg: "tiling"),
50 (modifiers: [Mod1], key: N, action: CycleLayout),
51 (modifiers: [Mod4], key: A, action: ToggleGaps),
52 (modifiers: [Mod4, Shift], key: Q, action: Quit),
53 (modifiers: [Mod4, Shift], key: R, action: Restart),
54 (modifiers: [Mod4], key: J, action: FocusStack, arg: -1),
55 (modifiers: [Mod4], key: K, action: FocusStack, arg: 1),
56 (modifiers: [Mod4], key: Comma, action: FocusMonitor, arg: -1),
57 (modifiers: [Mod4], key: Period, action: FocusMonitor, arg: 1),
58 (modifiers: [Mod4], key: Key1, action: ViewTag, arg: 0),
59 (modifiers: [Mod4], key: Key2, action: ViewTag, arg: 1),
60 (modifiers: [Mod4], key: Key3, action: ViewTag, arg: 2),
61 (modifiers: [Mod4], key: Key4, action: ViewTag, arg: 3),
62 (modifiers: [Mod4], key: Key5, action: ViewTag, arg: 4),
63 (modifiers: [Mod4], key: Key6, action: ViewTag, arg: 5),
64 (modifiers: [Mod4], key: Key7, action: ViewTag, arg: 6),
65 (modifiers: [Mod4], key: Key8, action: ViewTag, arg: 7),
66 (modifiers: [Mod4], key: Key9, action: ViewTag, arg: 8),
67 (modifiers: [Mod4, Shift], key: Key1, action: MoveToTag, arg: 0),
68 (modifiers: [Mod4, Shift], key: Key2, action: MoveToTag, arg: 1),
69 (modifiers: [Mod4, Shift], key: Key3, action: MoveToTag, arg: 2),
70 (modifiers: [Mod4, Shift], key: Key4, action: MoveToTag, arg: 3),
71 (modifiers: [Mod4, Shift], key: Key5, action: MoveToTag, arg: 4),
72 (modifiers: [Mod4, Shift], key: Key6, action: MoveToTag, arg: 5),
73 (modifiers: [Mod4, Shift], key: Key7, action: MoveToTag, arg: 6),
74 (modifiers: [Mod4, Shift], key: Key8, action: MoveToTag, arg: 7),
75 (modifiers: [Mod4, Shift], key: Key9, action: MoveToTag, arg: 8),
76
77 // Moving Windows
78 (modifiers: [Mod4, Control], key: K, action: SmartMoveWin, arg: 0), // UP
79 (modifiers: [Mod4, Control], key: J, action: SmartMoveWin, arg: 1), // DOWN
80 (modifiers: [Mod4, Control], key: H, action: SmartMoveWin, arg: 2), // LEFT
81 (modifiers: [Mod4, Control], key: L, action: SmartMoveWin, arg: 3), // RIGHT
82
83 // Exchanging Clients
84 (modifiers: [Mod4, Shift], key: K, action: ExchangeClient, arg: 0), // UP
85 (modifiers: [Mod4, Shift], key: J, action: ExchangeClient, arg: 1), // DOWN
86 (modifiers: [Mod4, Shift], key: H, action: ExchangeClient, arg: 2), // LEFT
87 (modifiers: [Mod4, Shift], key: L, action: ExchangeClient, arg: 3), // RIGHT
88
89 // Example keychord bindings (uncomment to use):
90 // Press Mod4+Space, then f to spawn firefox
91 // (keys: [(modifiers: [Mod4], key: Space), (modifiers: [], key: F)], action: Spawn, arg: "firefox"),
92
93 // Press Mod4+Space, then t to spawn terminal
94 // (keys: [(modifiers: [Mod4], key: Space), (modifiers: [], key: T)], action: Spawn, arg: "st"),
95
96 // Press Mod4+e, then e to spawn a text editor (same key twice)
97 // (keys: [(modifiers: [Mod4], key: E), (modifiers: [], key: E)], action: Spawn, arg: "nvim"),
98
99 // Press Mod4+x, then Shift+c to kill client (modifier on second key)
100 // (keys: [(modifiers: [Mod4], key: X), (modifiers: [Shift], key: C)], action: KillClient),
101 ],
102
103 status_blocks: [
104 (format: "Ram: {used}/{total} GB", command: "Ram", interval_secs: 5, color: 0x7aa2f7, underline: true),
105 (format: " │ ", command: "Static", interval_secs: 18446744073709551615, color: 0xa9b1d6, underline: false),
106 (format: "Kernel: {}", command: "Shell", command_arg: "uname -r", interval_secs: 18446744073709551615, color: 0xf7768e, underline: true),
107 (format: " │ ", command: "Static", interval_secs: 18446744073709551615, color: 0xa9b1d6, underline: false),
108 (format: "{}", command: "DateTime", command_arg: "%a, %b %d - %-I:%M %P", interval_secs: 1, color: 0x0db9d7, underline: true),
109 ],
110
111 scheme_normal: (foreground: 0xbbbbbb, background: 0x1a1b26, underline: 0x444444),
112 scheme_occupied: (foreground: 0x0db9d7, background: 0x1a1b26, underline: 0x0db9d7),
113 scheme_selected: (foreground: 0x0db9d7, background: 0x1a1b26, underline: 0xad8ee6),
114 )