tony / oxwm

Branch: faf793b
Switch branches/tags
master
tonybanters Autostart. a3649bf 2025-11-07
126 lines · 6.2 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 #DEFINE $terminal = "st"
6 #DEFINE $color_blue = 0x6dade3
7 #DEFINE $color_grey = 0xbbbbbb
8 #DEFINE $color_green = 0x9ece6a
9 #DEFINE $color_red = 0xf7768e
10 #DEFINE $color_cyan = 0x0db9d7
11 #DEFINE $color_purple = 0xad8ee6
12 #DEFINE $color_lavender = 0xa9b1d6
13 #DEFINE $color_bg = 0x1a1b26
14 #DEFINE $color_fg = 0xbbbbbb
15 #DEFINE $color_light_blue = 0x7aa2f7
16 #DEFINE $modkey = Mod4
17 #DEFINE $secondary_modkey = Mod1
18
19 (
20 border_width: 2,
21 border_focused: $color_blue,
22 border_unfocused: $color_grey,
23 font: "monospace:style=Bold:size=10",
24
25 gaps_enabled: true,
26 gap_inner_horizontal: 5,
27 gap_inner_vertical: 5,
28 gap_outer_horizontal: 5,
29 gap_outer_vertical: 5,
30
31 modkey: $modkey,
32
33 terminal: $terminal,
34
35 tags: ["1", "2", "3", "4", "5", "6", "7", "8", "9"],
36 layout_symbols: [
37 (name: "tiling", symbol: "[T]"),
38 (name: "normie", symbol: "[F]"),
39 ],
40
41 // Keybinding Format:
42 //
43 // New format (supports keychords - multi-key sequences):
44 // (keys: [(modifiers: [...], key: X), (modifiers: [...], key: Y)], action: ..., arg: ...)
45 //
46 // Old format (single key, backwards compatible):
47 // (modifiers: [...], key: X, action: ..., arg: ...)
48 //
49 // Examples:
50 // Single key: (keys: [(modifiers: [Mod4], key: Return)], action: Spawn, arg: "st")
51 // Keychord: (keys: [(modifiers: [Mod4], key: Space), (modifiers: [], key: F)], action: Spawn, arg: "firefox")
52 //
53 // You can cancel any in-progress keychord by pressing Escape.
54
55 keybindings: [
56 // Basic keybindings (old format for backwards compatibility)
57 (modifiers: [$modkey], key: Return, action: Spawn, arg: $terminal),
58 (modifiers: [$modkey], key: D, action: Spawn, arg: ["sh", "-c", "dmenu_run -l 10"]),
59 (modifiers: [$modkey], key: S, action: Spawn, arg: ["sh", "-c", "maim -s | xclip -selection clipboard -t image/png"]),
60 (modifiers: [$modkey], key: Q, action: KillClient),
61 (modifiers: [$modkey, Shift], key: F, action: ToggleFullScreen),
62 (modifiers: [$modkey, Shift], key: Space, action: ToggleFloating),
63 (modifiers: [$modkey], key: F, action: ChangeLayout, arg: "normie"),
64 (modifiers: [$modkey], key: C, action: ChangeLayout, arg: "tiling"),
65 (modifiers: [$secondary_modkey], key: N, action: CycleLayout),
66 (modifiers: [$modkey], key: A, action: ToggleGaps),
67 (modifiers: [$modkey, Shift], key: Q, action: Quit),
68 (modifiers: [$modkey, Shift], key: R, action: Restart),
69 (modifiers: [$modkey], key: H, action: FocusDirection, arg: 2),
70 (modifiers: [$modkey], key: J, action: FocusDirection, arg: 1),
71 (modifiers: [$modkey], key: K, action: FocusDirection, arg: 0),
72 (modifiers: [$modkey], key: L, action: FocusDirection, arg: 3),
73 (modifiers: [$modkey], key: Comma, action: FocusMonitor, arg: -1),
74 (modifiers: [$modkey], key: Period, action: FocusMonitor, arg: 1),
75 (modifiers: [$modkey], key: Key1, action: ViewTag, arg: 0),
76 (modifiers: [$modkey], key: Key2, action: ViewTag, arg: 1),
77 (modifiers: [$modkey], key: Key3, action: ViewTag, arg: 2),
78 (modifiers: [$modkey], key: Key4, action: ViewTag, arg: 3),
79 (modifiers: [$modkey], key: Key5, action: ViewTag, arg: 4),
80 (modifiers: [$modkey], key: Key6, action: ViewTag, arg: 5),
81 (modifiers: [$modkey], key: Key7, action: ViewTag, arg: 6),
82 (modifiers: [$modkey], key: Key8, action: ViewTag, arg: 7),
83 (modifiers: [$modkey], key: Key9, action: ViewTag, arg: 8),
84 (modifiers: [$modkey, Shift], key: Key1, action: MoveToTag, arg: 0),
85 (modifiers: [$modkey, Shift], key: Key2, action: MoveToTag, arg: 1),
86 (modifiers: [$modkey, Shift], key: Key3, action: MoveToTag, arg: 2),
87 (modifiers: [$modkey, Shift], key: Key4, action: MoveToTag, arg: 3),
88 (modifiers: [$modkey, Shift], key: Key5, action: MoveToTag, arg: 4),
89 (modifiers: [$modkey, Shift], key: Key6, action: MoveToTag, arg: 5),
90 (modifiers: [$modkey, Shift], key: Key7, action: MoveToTag, arg: 6),
91 (modifiers: [$modkey, Shift], key: Key8, action: MoveToTag, arg: 7),
92 (modifiers: [$modkey, Shift], key: Key9, action: MoveToTag, arg: 8),
93
94 (modifiers: [$modkey, Shift], key: H, action: SwapDirection, arg: 2),
95 (modifiers: [$modkey, Shift], key: J, action: SwapDirection, arg: 1),
96 (modifiers: [$modkey, Shift], key: K, action: SwapDirection, arg: 0),
97 (modifiers: [$modkey, Shift], key: L, action: SwapDirection, arg: 3),
98
99 // Example keychord bindings (uncomment to use):
100 // KEYCHORDS
101 // Press Mod4+Space, then t to spawn terminal
102 (keys: [(modifiers: [Mod4], key: Space), (modifiers: [], key: T)], action: Spawn, arg: $terminal),
103 ],
104
105 status_blocks: [
106 (format: "Ram: {used}/{total} GB", command: "Ram", interval_secs: 5, color: $color_light_blue, underline: true),
107 (format: " │ ", command: "Static", interval_secs: 18446744073709551615, color: $color_lavender, underline: false),
108 (format: "Kernel: {}", command: "Shell", command_arg: "uname -r", interval_secs: 18446744073709551615, color: $color_red, underline: true),
109 (format: " │ ", command: "Static", interval_secs: 18446744073709551615, color: $color_lavender, underline: false),
110 (format: "{}", command: "DateTime", command_arg: "%a, %b %d - %-I:%M %P", interval_secs: 1, color: $color_cyan, underline: true),
111 ],
112
113 scheme_normal: (foreground: $color_fg, background: $color_bg, underline: 0x444444),
114 scheme_occupied: (foreground: $color_cyan, background: $color_bg, underline: $color_cyan),
115 scheme_selected: (foreground: $color_cyan, background: $color_bg, underline: $color_purple),
116
117 // Autostart commands - these are executed when the window manager starts
118 // Commands are run in a shell, so you can use shell syntax (pipes, &&, etc.)
119 // Example: ["picom", "nitrogen --restore", "~/.config/polybar/launch.sh"]
120 autostart: [
121 // Uncomment and add your autostart commands here:
122 // "picom -b",
123 // "nitrogen --restore &",
124 // "dunst &",
125 ],
126 )