kore / overlays / dwl_config.h121 lines · 4362B · raw
1/* general */
2#define TAGCOUNT (6)
3
4static int log_level = WLR_ERROR;
5static const int sloppyfocus = 1;
6static const int bypass_surface_visibility = 0;
7
8/* appearance */
9static const unsigned int borderpx = 1;
10static const unsigned int snap = 32;
11static const float rootcolor[] = {0.1f, 0.1f, 0.1f, 1.0f};
12static const float bordercolor[] = {0.2f, 0.2f, 0.2f, 1.0f};
13static const float focuscolor[] = {0.0f, 0.3f, 0.4f, 1.0f};
14static const float urgentcolor[] = {0.1f, 0.0f, 0.0f, 1.0f};
15static const float fullscreen_bg[] = {0.1f, 0.1f, 0.1f, 1.0f};
16
17/* rules */
18static const Rule rules[] = {
19 { "Gimp_EXAMPLE", NULL, 0, 1, -1 },
20};
21
22/* layouts */
23static const Layout layouts[] = {
24 { "[T]", tile },
25 { "[F]", NULL },
26 { "[M]", monocle },
27};
28
29/* monitors */
30static const MonitorRule monrules[] = {
31 { NULL, 0.55f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
32};
33
34/* keyboard */
35static const int repeat_rate = 25;
36static const int repeat_delay = 600;
37
38static const struct xkb_rule_names xkb_rules = {
39 .layout = "us,th",
40 .options = "grp:alt_shift_toggle",
41};
42
43
44/* trackpad */
45static const int tap_to_click = 1;
46static const int tap_and_drag = 1;
47static const int drag_lock = 1;
48static const int natural_scrolling = 0;
49static const int disable_while_typing = 1;
50static const int left_handed = 0;
51static const int middle_button_emulation = 0;
52
53static const enum libinput_config_scroll_method scroll_method = LIBINPUT_CONFIG_SCROLL_2FG;
54static const enum libinput_config_click_method click_method = LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS;
55static const uint32_t send_events_mode = LIBINPUT_CONFIG_SEND_EVENTS_ENABLED;
56static const enum libinput_config_accel_profile accel_profile = LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE;
57static const double accel_speed = 0.0;
58static const enum libinput_config_tap_button_map button_map = LIBINPUT_CONFIG_TAP_MAP_LRM;
59
60/* commands */
61#define MODKEY WLR_MODIFIER_LOGO
62#define MODALT WLR_MODIFIER_ALT
63#define MODCTRL WLR_MODIFIER_CTRL
64#define MODSHIFT WLR_MODIFIER_SHIFT
65
66#define TAGKEYS(KEY, TAG) \
67 { MODKEY, KEY, view, {.ui = 1 << TAG} }, \
68 { MODKEY|MODCTRL, KEY, toggleview, {.ui = 1 << TAG} }, \
69 { MODKEY|MODSHIFT, KEY, tag, {.ui = 1 << TAG} }, \
70 { MODKEY|MODCTRL|MODSHIFT, KEY, toggletag, {.ui = 1 << TAG} }
71
72#define CHVT(n) { MODCTRL|MODALT, XKB_KEY_F##n, chvt, {.ui = (n)} }
73
74static const char *termcmd[] = { "foot", NULL };
75static const char *menucmd[] = { "wmenu-run", NULL };
76
77static const Key keys[] = {
78 { MODKEY, XKB_KEY_d, spawn, {.v = menucmd} },
79 { MODKEY, XKB_KEY_Return, spawn, {.v = termcmd} },
80 { MODKEY, XKB_KEY_j, focusstack, {.i = +1} },
81 { MODKEY, XKB_KEY_h, setmfact, {.f = -0.05f} },
82 { MODKEY, XKB_KEY_l, setmfact, {.f = +0.05f} },
83 { MODKEY, XKB_KEY_i, incnmaster, {.i = +1} },
84 { MODKEY, XKB_KEY_o, incnmaster, {.i = -1} },
85 { MODKEY, XKB_KEY_k, focusstack, {.i = -1} },
86 { MODKEY, XKB_KEY_q, killclient, {0} },
87 { MODKEY|MODSHIFT, XKB_KEY_Tab, view, {0} },
88 { MODKEY|MODSHIFT, XKB_KEY_Return, zoom, {0} },
89 { MODKEY|MODSHIFT, XKB_KEY_t, setlayout, {.v = &layouts[0]} },
90 { MODKEY|MODSHIFT, XKB_KEY_f, setlayout, {.v = &layouts[1]} },
91 { MODKEY|MODSHIFT, XKB_KEY_m, setlayout, {.v = &layouts[2]} },
92 { MODKEY, XKB_KEY_space, togglefloating, {0} },
93 { MODKEY, XKB_KEY_f, togglefullscreen, {0} },
94 { MODKEY, XKB_KEY_comma, focusmon, {.i = WLR_DIRECTION_LEFT} },
95 { MODKEY, XKB_KEY_period, focusmon, {.i = WLR_DIRECTION_RIGHT} },
96 { MODKEY|MODSHIFT, XKB_KEY_comma, tagmon, {.i = WLR_DIRECTION_LEFT} },
97 { MODKEY|MODSHIFT, XKB_KEY_period, tagmon, {.i = WLR_DIRECTION_RIGHT} },
98 { MODKEY|MODSHIFT, XKB_KEY_p, quit, {0} },
99
100 /* Ctrl-Alt-Backspace and Ctrl-Alt-Fx used to be handled by X server */
101 { MODCTRL|MODALT, XKB_KEY_BackSpace, quit, {0} },
102
103 TAGKEYS(XKB_KEY_1, 0),
104 TAGKEYS(XKB_KEY_2, 1),
105 TAGKEYS(XKB_KEY_3, 2),
106 TAGKEYS(XKB_KEY_4, 3),
107 TAGKEYS(XKB_KEY_5, 4),
108 TAGKEYS(XKB_KEY_6, 5),
109
110 /* Ctrl-Alt-Fx is used to switch to another VT */
111 CHVT(1), CHVT(2), CHVT(3), CHVT(4), CHVT(5), CHVT(6),
112 CHVT(7), CHVT(8), CHVT(9), CHVT(10), CHVT(11), CHVT(12),
113};
114
115static const Button buttons[] = {
116 { MODKEY, BTN_LEFT, moveresize, {.ui = CurMove} },
117 { MODKEY, BTN_RIGHT, moveresize, {.ui = CurResize} },
118 { MODKEY, BTN_MIDDLE, togglefloating, {0} },
119};
120
121static const Axis axes[] = {};