| @@ -25,6 +25,9 @@ local modkey = "Mod4" |
| 25 |
local terminal = "alacritty" |
25 |
local terminal = "alacritty" |
| 26 |
|
26 |
|
| 27 |
-- Color palette - customize these to match your theme |
27 |
-- Color palette - customize these to match your theme |
|
|
28 |
+-- Alternatively you can import other files in here, such as |
|
|
29 |
+-- local colors = require("colors.lua") and make colors.lua a file |
|
|
30 |
+-- in the ~/.config/oxwm directory |
| 28 |
local colors = { |
31 |
local colors = { |
| 29 |
fg = "#bbbbbb", |
32 |
fg = "#bbbbbb", |
| 30 |
red = "#f7768e", |
33 |
red = "#f7768e", |
| @@ -55,28 +58,24 @@ local blocks = { |
| 55 |
underline = true, |
58 |
underline = true, |
| 56 |
}), |
59 |
}), |
| 57 |
oxwm.bar.block.static({ |
60 |
oxwm.bar.block.static({ |
| 58 |
- format = "{}", |
|
|
| 59 |
text = " │ ", |
61 |
text = " │ ", |
| 60 |
interval = 999999999, |
62 |
interval = 999999999, |
| 61 |
color = colors.lavender, |
63 |
color = colors.lavender, |
| 62 |
underline = false, |
64 |
underline = false, |
| 63 |
}), |
65 |
}), |
| 64 |
oxwm.bar.block.shell({ |
66 |
oxwm.bar.block.shell({ |
| 65 |
- format = "Kernel: {}", |
|
|
| 66 |
command = "uname -r", |
67 |
command = "uname -r", |
| 67 |
interval = 999999999, |
68 |
interval = 999999999, |
| 68 |
color = colors.red, |
69 |
color = colors.red, |
| 69 |
underline = true, |
70 |
underline = true, |
| 70 |
}), |
71 |
}), |
| 71 |
oxwm.bar.block.static({ |
72 |
oxwm.bar.block.static({ |
| 72 |
- format = "{}", |
|
|
| 73 |
text = " │ ", |
73 |
text = " │ ", |
| 74 |
interval = 999999999, |
74 |
interval = 999999999, |
| 75 |
color = colors.lavender, |
75 |
color = colors.lavender, |
| 76 |
underline = false, |
76 |
underline = false, |
| 77 |
}), |
77 |
}), |
| 78 |
oxwm.bar.block.datetime({ |
78 |
oxwm.bar.block.datetime({ |
| 79 |
- format = "{}", |
|
|
| 80 |
date_format = "%a, %b %d - %-I:%M %P", |
79 |
date_format = "%a, %b %d - %-I:%M %P", |
| 81 |
interval = 1, |
80 |
interval = 1, |
| 82 |
color = colors.cyan, |
81 |
color = colors.cyan, |
| @@ -114,14 +113,20 @@ oxwm.set_layout_symbol("tabbed", "[=]") |
| 114 |
-- Appearance |
113 |
-- Appearance |
| 115 |
------------------------------------------------------------------------------- |
114 |
------------------------------------------------------------------------------- |
| 116 |
-- Border configuration |
115 |
-- Border configuration |
| 117 |
-oxwm.border.set_width(2) -- Width in pixels |
|
|
| 118 |
-oxwm.border.set_focused_color(colors.blue) -- Color of focused window border |
|
|
| 119 |
-oxwm.border.set_unfocused_color(colors.grey) -- Color of unfocused window borders |
|
|
| 120 |
|
116 |
|
| 121 |
--- Gap configuration (space between windows and screen edges) |
117 |
+-- Width in pixels |
| 122 |
-oxwm.gaps.set_enabled(true) -- Enable or disable gaps |
118 |
+oxwm.border.set_width(2) |
| 123 |
-oxwm.gaps.set_inner(5, 5) -- Inner gaps (horizontal, vertical) in pixels |
119 |
+-- Color of focused window border |
| 124 |
-oxwm.gaps.set_outer(5, 5) -- Outer gaps (horizontal, vertical) in pixels |
120 |
+oxwm.border.set_focused_color(colors.blue) |
|
|
121 |
+-- Color of unfocused window borders |
|
|
122 |
+oxwm.border.set_unfocused_color(colors.grey) |
|
|
123 |
+ |
|
|
124 |
+-- Smart Enabled = No border if 1 window |
|
|
125 |
+oxwm.gaps.set_smart(enabled) |
|
|
126 |
+-- Inner gaps (horizontal, vertical) in pixels |
|
|
127 |
+oxwm.gaps.set_inner(5, 5) |
|
|
128 |
+-- Outer gaps (horizontal, vertical) in pixels |
|
|
129 |
+oxwm.gaps.set_outer(5, 5) |
| 125 |
|
130 |
|
| 126 |
------------------------------------------------------------------------------- |
131 |
------------------------------------------------------------------------------- |
| 127 |
-- Window Rules |
132 |
-- Window Rules |
| @@ -136,9 +141,9 @@ oxwm.gaps.set_outer(5, 5) -- Outer gaps (horizontal, vertical) in pixels |
| 136 |
-- - Configure window behavior based on title or class |
141 |
-- - Configure window behavior based on title or class |
| 137 |
|
142 |
|
| 138 |
-- Examples (uncomment to use): |
143 |
-- Examples (uncomment to use): |
| 139 |
--- oxwm.rule.add({ class = "firefox", title = "Library", floating = true }) -- Make Firefox Library window floating |
144 |
+oxwm.rule.add({ instance = "gimp", floating = true }) |
| 140 |
--- oxwm.rule.add({ instance = "gimp", tag = 5 }) -- Send GIMP to workspace 6 (0-indexed) |
145 |
+-- oxwm.rule.add({ class = "firefox", title = "Library", floating = true }) |
| 141 |
--- oxwm.rule.add({ instance = "mpv", floating = true }) -- Make mpv always float |
146 |
+-- oxwm.rule.add({ instance = "mpv", floating = true }) |
| 142 |
|
147 |
|
| 143 |
-- To find window properties, use xprop and click on the window |
148 |
-- To find window properties, use xprop and click on the window |
| 144 |
-- WM_CLASS(STRING) shows both instance and class (instance, class) |
149 |
-- WM_CLASS(STRING) shows both instance and class (instance, class) |
| @@ -154,9 +159,13 @@ oxwm.bar.set_blocks(blocks) |
| 154 |
|
159 |
|
| 155 |
-- Bar color schemes (for workspace tag display) |
160 |
-- Bar color schemes (for workspace tag display) |
| 156 |
-- Parameters: foreground, background, border |
161 |
-- Parameters: foreground, background, border |
| 157 |
-oxwm.bar.set_scheme_normal(colors.fg, colors.bg, "#444444") -- Unoccupied tags |
162 |
+ |
| 158 |
-oxwm.bar.set_scheme_occupied(colors.cyan, colors.bg, colors.cyan) -- Occupied tags |
163 |
+-- Unoccupied tags |
| 159 |
-oxwm.bar.set_scheme_selected(colors.cyan, colors.bg, colors.purple) -- Currently selected tag |
164 |
+oxwm.bar.set_scheme_normal(colors.fg, colors.bg, "#444444") |
|
|
165 |
+-- Occupied tags |
|
|
166 |
+oxwm.bar.set_scheme_occupied(colors.cyan, colors.bg, colors.cyan) |
|
|
167 |
+-- Currently selected tag |
|
|
168 |
+oxwm.bar.set_scheme_selected(colors.cyan, colors.bg, colors.purple) |
| 160 |
|
169 |
|
| 161 |
------------------------------------------------------------------------------- |
170 |
------------------------------------------------------------------------------- |
| 162 |
-- Keybindings |
171 |
-- Keybindings |
| @@ -170,49 +179,59 @@ oxwm.bar.set_scheme_selected(colors.cyan, colors.bg, colors.purple) -- Currently |
| 170 |
-- Common keys: Return, Space, Tab, Escape, Backspace, Delete, Left, Right, Up, Down |
179 |
-- Common keys: Return, Space, Tab, Escape, Backspace, Delete, Left, Right, Up, Down |
| 171 |
|
180 |
|
| 172 |
-- Basic window management |
181 |
-- Basic window management |
| 173 |
-oxwm.key.bind({ modkey }, "Return", oxwm.spawn_terminal()) -- Spawn terminal |
182 |
+ |
| 174 |
-oxwm.key.bind({ modkey }, "D", oxwm.spawn({ "sh", "-c", "dmenu_run -l 10" })) -- Application launcher |
183 |
+oxwm.key.bind({ modkey }, "Return", oxwm.spawn_terminal()) |
| 175 |
-oxwm.key.bind({ modkey }, "S", oxwm.spawn({ "sh", "-c", "maim -s | xclip -selection clipboard -t image/png" })) -- Screenshot selection |
184 |
+-- Launch Dmenu |
| 176 |
-oxwm.key.bind({ modkey }, "Q", oxwm.client.kill()) -- Close focused window |
185 |
+oxwm.key.bind({ modkey }, "D", oxwm.spawn({ "sh", "-c", "dmenu_run -l 10" })) |
|
|
186 |
+-- Copy screenshot to clipboard |
|
|
187 |
+oxwm.key.bind({ modkey }, "S", oxwm.spawn({ "sh", "-c", "maim -s | xclip -selection clipboard -t image/png" })) |
|
|
188 |
+oxwm.key.bind({ modkey }, "Q", oxwm.client.kill()) |
| 177 |
|
189 |
|
| 178 |
-- Keybind overlay - Shows important keybindings on screen |
190 |
-- Keybind overlay - Shows important keybindings on screen |
| 179 |
oxwm.key.bind({ modkey, "Shift" }, "Slash", oxwm.show_keybinds()) |
191 |
oxwm.key.bind({ modkey, "Shift" }, "Slash", oxwm.show_keybinds()) |
| 180 |
|
192 |
|
| 181 |
-- Window state toggles |
193 |
-- Window state toggles |
| 182 |
-oxwm.key.bind({ modkey, "Shift" }, "F", oxwm.client.toggle_fullscreen()) -- Toggle fullscreen |
194 |
+oxwm.key.bind({ modkey, "Shift" }, "F", oxwm.client.toggle_fullscreen()) |
| 183 |
-oxwm.key.bind({ modkey, "Shift" }, "Space", oxwm.client.toggle_floating()) -- Toggle floating mode |
195 |
+oxwm.key.bind({ modkey, "Shift" }, "Space", oxwm.client.toggle_floating()) |
| 184 |
|
196 |
|
| 185 |
-- Layout management |
197 |
-- Layout management |
| 186 |
-oxwm.key.bind({ modkey }, "F", oxwm.layout.set("normie")) -- Set floating layout |
198 |
+oxwm.key.bind({ modkey }, "F", oxwm.layout.set("normie")) |
| 187 |
-oxwm.key.bind({ modkey }, "C", oxwm.layout.set("tiling")) -- Set tiling layout |
199 |
+oxwm.key.bind({ modkey }, "C", oxwm.layout.set("tiling")) |
| 188 |
-oxwm.key.bind({ modkey }, "N", oxwm.layout.cycle()) -- Cycle through layouts |
200 |
+-- Cycle through layouts |
|
|
201 |
+oxwm.key.bind({ modkey }, "N", oxwm.layout.cycle()) |
| 189 |
|
202 |
|
| 190 |
-- Master area controls (tiling layout) |
203 |
-- Master area controls (tiling layout) |
| 191 |
-oxwm.key.bind({ modkey }, "H", oxwm.set_master_factor(-5)) -- Decrease master area width |
204 |
+ |
| 192 |
-oxwm.key.bind({ modkey }, "L", oxwm.set_master_factor(5)) -- Increase master area width |
205 |
+-- Decrease/Increase master area width |
| 193 |
-oxwm.key.bind({ modkey }, "I", oxwm.inc_num_master(1)) -- Increment number of master windows |
206 |
+oxwm.key.bind({ modkey }, "H", oxwm.set_master_factor(-5)) |
| 194 |
-oxwm.key.bind({ modkey }, "P", oxwm.inc_num_master(-1)) -- Decrement number of master windows |
207 |
+oxwm.key.bind({ modkey }, "L", oxwm.set_master_factor(5)) |
|
|
208 |
+-- Increment/Decrement number of master windows |
|
|
209 |
+oxwm.key.bind({ modkey }, "I", oxwm.inc_num_master(1)) |
|
|
210 |
+oxwm.key.bind({ modkey }, "P", oxwm.inc_num_master(-1)) |
| 195 |
|
211 |
|
| 196 |
-- Gaps toggle |
212 |
-- Gaps toggle |
| 197 |
-oxwm.key.bind({ modkey }, "A", oxwm.toggle_gaps()) -- Toggle gaps on/off |
213 |
+oxwm.key.bind({ modkey }, "A", oxwm.toggle_gaps()) |
| 198 |
|
214 |
|
| 199 |
-- Window manager controls |
215 |
-- Window manager controls |
| 200 |
-oxwm.key.bind({ modkey, "Shift" }, "Q", oxwm.quit()) -- Quit OXWM |
216 |
+oxwm.key.bind({ modkey, "Shift" }, "Q", oxwm.quit()) |
| 201 |
-oxwm.key.bind({ modkey, "Shift" }, "R", oxwm.restart()) -- Restart OXWM (reloads config) |
217 |
+oxwm.key.bind({ modkey, "Shift" }, "R", oxwm.restart()) |
| 202 |
|
218 |
|
| 203 |
--- Focus movement (stack cycling) |
219 |
+-- Focus movement [1 for up in the stack, -1 for down] |
| 204 |
-oxwm.key.bind({ modkey }, "J", oxwm.client.focus_stack(1)) -- Focus next window in stack |
220 |
+oxwm.key.bind({ modkey }, "J", oxwm.client.focus_stack(1)) |
| 205 |
-oxwm.key.bind({ modkey }, "K", oxwm.client.focus_stack(-1)) -- Focus previous window in stack |
221 |
+oxwm.key.bind({ modkey }, "K", oxwm.client.focus_stack(-1)) |
| 206 |
|
222 |
|
| 207 |
-- Window movement (swap position in stack) |
223 |
-- Window movement (swap position in stack) |
| 208 |
-oxwm.key.bind({ modkey, "Shift" }, "J", oxwm.client.move_stack(1)) -- Move window down in stack |
224 |
+oxwm.key.bind({ modkey, "Shift" }, "J", oxwm.client.move_stack(1)) |
| 209 |
-oxwm.key.bind({ modkey, "Shift" }, "K", oxwm.client.move_stack(-1)) -- Move window up in stack |
225 |
+oxwm.key.bind({ modkey, "Shift" }, "K", oxwm.client.move_stack(-1)) |
| 210 |
|
226 |
|
| 211 |
-- Multi-monitor support |
227 |
-- Multi-monitor support |
| 212 |
-oxwm.key.bind({ modkey }, "Comma", oxwm.monitor.focus(-1)) -- Focus previous monitor |
228 |
+ |
| 213 |
-oxwm.key.bind({ modkey }, "Period", oxwm.monitor.focus(1)) -- Focus next monitor |
229 |
+-- Focus next/previous Monitors |
| 214 |
-oxwm.key.bind({ modkey, "Shift" }, "Comma", oxwm.monitor.tag(-1)) -- Send window to previous monitor |
230 |
+oxwm.key.bind({ modkey }, "Comma", oxwm.monitor.focus(-1)) |
| 215 |
-oxwm.key.bind({ modkey, "Shift" }, "Period", oxwm.monitor.tag(1)) -- Send window to next monitor |
231 |
+oxwm.key.bind({ modkey }, "Period", oxwm.monitor.focus(1)) |
|
|
232 |
+-- Move window to next/previous Monitors |
|
|
233 |
+oxwm.key.bind({ modkey, "Shift" }, "Comma", oxwm.monitor.tag(-1)) |
|
|
234 |
+oxwm.key.bind({ modkey, "Shift" }, "Period", oxwm.monitor.tag(1)) |
| 216 |
|
235 |
|
| 217 |
-- Workspace (tag) navigation |
236 |
-- Workspace (tag) navigation |
| 218 |
-- Switch to workspace N (tags are 0-indexed, so tag "1" is index 0) |
237 |
-- Switch to workspace N (tags are 0-indexed, so tag "1" is index 0) |
| @@ -237,6 +256,30 @@ oxwm.key.bind({ modkey, "Shift" }, "7", oxwm.tag.move_to(6)) |
| 237 |
oxwm.key.bind({ modkey, "Shift" }, "8", oxwm.tag.move_to(7)) |
256 |
oxwm.key.bind({ modkey, "Shift" }, "8", oxwm.tag.move_to(7)) |
| 238 |
oxwm.key.bind({ modkey, "Shift" }, "9", oxwm.tag.move_to(8)) |
257 |
oxwm.key.bind({ modkey, "Shift" }, "9", oxwm.tag.move_to(8)) |
| 239 |
|
258 |
|
|
|
259 |
+-- Combo view (view multiple tags at once) {argos_nothing} |
|
|
260 |
+-- Example: Mod+Ctrl+2 while on tag 1 will show BOTH tags 1 and 2 |
|
|
261 |
+oxwm.key.bind({ modkey, "Control" }, "1", oxwm.tag.toggleview(0)) |
|
|
262 |
+oxwm.key.bind({ modkey, "Control" }, "2", oxwm.tag.toggleview(1)) |
|
|
263 |
+oxwm.key.bind({ modkey, "Control" }, "3", oxwm.tag.toggleview(2)) |
|
|
264 |
+oxwm.key.bind({ modkey, "Control" }, "4", oxwm.tag.toggleview(3)) |
|
|
265 |
+oxwm.key.bind({ modkey, "Control" }, "5", oxwm.tag.toggleview(4)) |
|
|
266 |
+oxwm.key.bind({ modkey, "Control" }, "6", oxwm.tag.toggleview(5)) |
|
|
267 |
+oxwm.key.bind({ modkey, "Control" }, "7", oxwm.tag.toggleview(6)) |
|
|
268 |
+oxwm.key.bind({ modkey, "Control" }, "8", oxwm.tag.toggleview(7)) |
|
|
269 |
+oxwm.key.bind({ modkey, "Control" }, "9", oxwm.tag.toggleview(8)) |
|
|
270 |
+ |
|
|
271 |
+-- Multi tag (window on multiple tags) |
|
|
272 |
+-- Example: Mod+Ctrl+Shift+2 puts focused window on BOTH current tag and tag 2 |
|
|
273 |
+oxwm.key.bind({ modkey, "Control", "Shift" }, "1", oxwm.tag.toggletag(0)) |
|
|
274 |
+oxwm.key.bind({ modkey, "Control", "Shift" }, "2", oxwm.tag.toggletag(1)) |
|
|
275 |
+oxwm.key.bind({ modkey, "Control", "Shift" }, "3", oxwm.tag.toggletag(2)) |
|
|
276 |
+oxwm.key.bind({ modkey, "Control", "Shift" }, "4", oxwm.tag.toggletag(3)) |
|
|
277 |
+oxwm.key.bind({ modkey, "Control", "Shift" }, "5", oxwm.tag.toggletag(4)) |
|
|
278 |
+oxwm.key.bind({ modkey, "Control", "Shift" }, "6", oxwm.tag.toggletag(5)) |
|
|
279 |
+oxwm.key.bind({ modkey, "Control", "Shift" }, "7", oxwm.tag.toggletag(6)) |
|
|
280 |
+oxwm.key.bind({ modkey, "Control", "Shift" }, "8", oxwm.tag.toggletag(7)) |
|
|
281 |
+oxwm.key.bind({ modkey, "Control", "Shift" }, "9", oxwm.tag.toggletag(8)) |
|
|
282 |
+ |
| 240 |
------------------------------------------------------------------------------- |
283 |
------------------------------------------------------------------------------- |
| 241 |
-- Advanced: Keychords |
284 |
-- Advanced: Keychords |
| 242 |
------------------------------------------------------------------------------- |
285 |
------------------------------------------------------------------------------- |
| @@ -254,7 +297,7 @@ oxwm.key.chord({ |
| 254 |
-- Commands to run once when OXWM starts |
297 |
-- Commands to run once when OXWM starts |
| 255 |
-- Uncomment and modify these examples, or add your own |
298 |
-- Uncomment and modify these examples, or add your own |
| 256 |
|
299 |
|
| 257 |
--- oxwm.autostart("picom") -- Compositor for transparency and effects |
300 |
+-- oxwm.autostart("picom") |
| 258 |
--- oxwm.autostart("feh --bg-scale ~/wallpaper.jpg") -- Set wallpaper |
301 |
+-- oxwm.autostart("feh --bg-scale ~/wallpaper.jpg") |
| 259 |
--- oxwm.autostart("dunst") -- Notification daemon |
302 |
+-- oxwm.autostart("dunst") |
| 260 |
--- oxwm.autostart("nm-applet") -- Network manager applet |
303 |
+-- oxwm.autostart("nm-applet") |