aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/wm/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/wm/config.h')
-rw-r--r--src/cmd/wm/config.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/src/cmd/wm/config.h b/src/cmd/wm/config.h
new file mode 100644
index 0000000..1f5ba85
--- /dev/null
+++ b/src/cmd/wm/config.h
@@ -0,0 +1,70 @@
+/* appearance */
+CONFIG(int, sloppyfocus, 1);
+CONFIG(int, borderpixel, 1);
+CONFIG(float, rootcolor[], {0.3, 0.3, 0.3, 1.0});
+CONFIG(float, bordercolor[], {0.5, 0.5, 0.5, 1.0});
+CONFIG(float, focuscolor[], {1.0, 0.0, 0.0, 1.0});
+
+/* sampling */
+CONFIG(int, repeat_rate, 25);
+CONFIG(int, repeat_delay, 600);
+
+/* tags */
+CONFIG(char*, tags[], { "1", "2", "3", "4", "5", "6", "7", "8", "9" });
+
+/* application specific rules */
+CONFIG(Rule, rule[], {
+ /* app_id title tags mask isfloating monitor */
+ /* examples:
+ { "Gimp", nil, 0, 1, -1 },
+ { "firefox", nil, 1 << 8, 0, -1 },
+ */
+});
+CONFIG(Rule*, endrule, arrend(cfg·rule));
+
+/* commands */
+CONFIG(char*, termcommand[], { "alacritty", nil });
+CONFIG(char*, menucommand[], { "dmenu-wl_run", nil });
+
+/* layouts */
+CONFIG(Layout, layouts[], {
+ /* symbol arrange */
+ { "[]=", tile },
+ { "><>", nil }, /* no layout function means floating behavior */
+});
+CONFIG(Layout*, endlayout, arrend(cfg·layouts));
+
+/* monitors
+ * The order in which monitors are defined determines their position.
+ * non-configured monitors are always added to the left. */
+CONFIG(MonitorRule, monitorrule[], {
+ /* name layout, x, y, scale, transform master */
+ { nil, &cfg·layouts[0], 0, 0, 1, WL_OUTPUT_TRANSFORM_NORMAL, {0.55, 1} },
+});
+CONFIG(MonitorRule*, endmonitorrule, arrend(cfg·monitorrule));
+
+/* keybindings */
+#define MODKEY WLR_MODIFIER_ALT
+#define MOD(a) WLR_MODIFIER_##a
+#define KEY(a) XKB_KEY_##a
+
+CONFIG(Key, binding[], {
+ /* modifier key function argument */
+ { MODKEY, KEY(Return), spawn, {.v = cfg·termcommand} },
+ { MODKEY, KEY(d), spawn, {.v = cfg·menucommand} },
+ { MODKEY|MOD(SHIFT), KEY(Q), quit, {.v = nil} },
+});
+CONFIG(Key*, endbinding, arrend(cfg·binding));
+
+#undef MOD
+#undef KEY
+
+/* mouse buttons */
+CONFIG(Button, button[], {
+ { MODKEY, BTN_LEFT, move_client, {0} },
+ { MODKEY, BTN_MIDDLE, float_client, {0} },
+ { MODKEY, BTN_RIGHT, resize_client, {0} },
+});
+CONFIG(Button*, endbutton, arrend(cfg·button));
+
+#undef MODKEY