tony / oxwm

Branch: daf7a1c
Switch branches/tags
master
tonybtw Migration to lua. faf793b 2025-11-08
179 lines · 6.5 KB Raw Blame History
1 -- OXWM Configuration File (Lua)
2 -- Migrated from config.ron
3 -- Edit this file and reload with Mod+Shift+R (no compilation needed!)
4
5 local terminal = "st"
6 local modkey = "Mod4"
7
8 -- Color palette
9 local colors = {
10 lavender = "#a9b1d6",
11 light_blue = "#7aa2f7",
12 grey = "#bbbbbb",
13 purple = "#ad8ee6",
14 cyan = "#0db9d7",
15 bg = "#1a1b26",
16 green = "#9ece6a",
17 red = "#f7768e",
18 fg = "#bbbbbb",
19 blue = "#6dade3",
20 }
21
22 -- Main configuration table
23 return {
24 -- Appearance
25 border_width = 2,
26 border_focused = colors.blue,
27 border_unfocused = colors.grey,
28 font = "JetBrainsMono Nerd Font:style=Bold:size=12",
29
30 -- Window gaps
31 gaps_enabled = true,
32 gap_inner_horizontal = 5,
33 gap_inner_vertical = 5,
34 gap_outer_horizontal = 5,
35 gap_outer_vertical = 5,
36
37 -- Basics
38 modkey = "Mod1",
39 terminal = "st",
40
41 -- Workspace tags
42 tags = { "1", "2", "3", "4", "5", "6", "7", "8", "9" },
43
44 -- Layout symbol overrides
45 layout_symbols = {
46 { name = "tiling", symbol = "[T]" },
47 { name = "normie", symbol = "[F]" },
48 },
49
50 -- Keybindings
51 keybindings = {
52 {
53 keys = {
54 { modifiers = { "Mod1" }, key = "Space" },
55 { modifiers = { }, key = "T" },
56 },
57 action = "Spawn",
58 arg = "st"
59 },
60 { modifiers = { "Mod1" }, key = "Return", action = "Spawn", arg = "st" },
61 { modifiers = { "Mod1" }, key = "D", action = "Spawn", arg = { "sh", "-c", "dmenu_run -l 10" } },
62 { modifiers = { "Mod1" }, key = "S", action = "Spawn", arg = { "sh", "-c", "maim -s | xclip -selection clipboard -t image/png" } },
63 { modifiers = { "Mod1" }, key = "Q", action = "KillClient" },
64 { modifiers = { "Mod1", "Shift" }, key = "F", action = "ToggleFullScreen" },
65 { modifiers = { "Mod1", "Shift" }, key = "Space", action = "ToggleFloating" },
66 { modifiers = { "Mod1" }, key = "F", action = "ChangeLayout", arg = "normie" },
67 { modifiers = { "Mod1" }, key = "C", action = "ChangeLayout", arg = "tiling" },
68 { modifiers = { "Mod1" }, key = "N", action = "CycleLayout" },
69 { modifiers = { "Mod1" }, key = "A", action = "ToggleGaps" },
70 { modifiers = { "Mod1", "Shift" }, key = "Q", action = "Quit" },
71 { modifiers = { "Mod1", "Shift" }, key = "R", action = "Restart" },
72 { modifiers = { "Mod1" }, key = "H", action = "FocusDirection", arg = 2 },
73 { modifiers = { "Mod1" }, key = "J", action = "FocusDirection", arg = 1 },
74 { modifiers = { "Mod1" }, key = "K", action = "FocusDirection", arg = 0 },
75 { modifiers = { "Mod1" }, key = "L", action = "FocusDirection", arg = 3 },
76 { modifiers = { "Mod1", "Shift" }, key = "H", action = "SwapDirection", arg = 2 },
77 { modifiers = { "Mod1", "Shift" }, key = "J", action = "SwapDirection", arg = 1 },
78 { modifiers = { "Mod1", "Shift" }, key = "K", action = "SwapDirection", arg = 0 },
79 { modifiers = { "Mod1", "Shift" }, key = "L", action = "SwapDirection", arg = 3 },
80 { modifiers = { "Mod1" }, key = "1", action = "ViewTag", arg = 0 },
81 { modifiers = { "Mod1" }, key = "2", action = "ViewTag", arg = 1 },
82 { modifiers = { "Mod1" }, key = "3", action = "ViewTag", arg = 2 },
83 { modifiers = { "Mod1" }, key = "4", action = "ViewTag", arg = 3 },
84 { modifiers = { "Mod1" }, key = "5", action = "ViewTag", arg = 4 },
85 { modifiers = { "Mod1" }, key = "6", action = "ViewTag", arg = 5 },
86 { modifiers = { "Mod1" }, key = "7", action = "ViewTag", arg = 6 },
87 { modifiers = { "Mod1" }, key = "8", action = "ViewTag", arg = 7 },
88 { modifiers = { "Mod1" }, key = "9", action = "ViewTag", arg = 8 },
89 { modifiers = { "Mod1", "Shift" }, key = "1", action = "MoveToTag", arg = 0 },
90 { modifiers = { "Mod1", "Shift" }, key = "2", action = "MoveToTag", arg = 1 },
91 { modifiers = { "Mod1", "Shift" }, key = "3", action = "MoveToTag", arg = 2 },
92 { modifiers = { "Mod1", "Shift" }, key = "4", action = "MoveToTag", arg = 3 },
93 { modifiers = { "Mod1", "Shift" }, key = "5", action = "MoveToTag", arg = 4 },
94 { modifiers = { "Mod1", "Shift" }, key = "6", action = "MoveToTag", arg = 5 },
95 { modifiers = { "Mod1", "Shift" }, key = "7", action = "MoveToTag", arg = 6 },
96 { modifiers = { "Mod1", "Shift" }, key = "8", action = "MoveToTag", arg = 7 },
97 { modifiers = { "Mod1", "Shift" }, key = "9", action = "MoveToTag", arg = 8 },
98 },
99
100 -- Status bar blocks
101 status_blocks = {
102 {
103 format = "",
104 command = "Battery",
105 battery_formats = {
106 charging = "󰂄 Bat: {}%",
107 discharging = "󰁹 Bat:{}%",
108 full = "󰁹 Bat: {}%"
109 },
110 interval_secs = 30,
111 color = colors.green,
112 underline = true
113 },
114 {
115 format = " │ ",
116 command = "Static",
117 interval_secs = 999999999,
118 color = colors.lavender,
119 underline = false
120 },
121 {
122 format = "󰍛 {used}/{total} GB",
123 command = "Ram",
124 interval_secs = 5,
125 color = colors.light_blue,
126 underline = true
127 },
128 {
129 format = " │ ",
130 command = "Static",
131 interval_secs = 999999999,
132 color = colors.lavender,
133 underline = false
134 },
135 {
136 format = " {}",
137 command = "Shell",
138 command_arg = "uname -r",
139 interval_secs = 999999999,
140 color = colors.red,
141 underline = true
142 },
143 {
144 format = " │ ",
145 command = "Static",
146 interval_secs = 999999999,
147 color = colors.lavender,
148 underline = false
149 },
150 {
151 format = "󰸘 {}",
152 command = "DateTime",
153 command_arg = "%a, %b %d - %-I:%M %P",
154 interval_secs = 1,
155 color = colors.cyan,
156 underline = true
157 },
158 },
159
160 -- Color schemes for bar
161 scheme_normal = {
162 foreground = colors.fg,
163 background = colors.bg,
164 underline = "#444444"
165 },
166 scheme_occupied = {
167 foreground = colors.cyan,
168 background = colors.bg,
169 underline = colors.cyan
170 },
171 scheme_selected = {
172 foreground = colors.cyan,
173 background = colors.bg,
174 underline = colors.purple
175 },
176
177 -- Autostart commands
178 autostart = {},
179 }