commit f1b3793e034f21e0658fff217084ad7c7340d13b
parent 1e4e42dfc927d5105055c979a7653650bd3f436b
Author: Ethan Long <me@ethandl.dev>
Date: Wed, 7 Jan 2026 16:30:28 +1100
A few changes to the void linux config after actually using it.
It is quite likely that the OpenBSD configuration will need some fiddling,
the bindings were all off...
Diffstat:
2 files changed, 35 insertions(+), 21 deletions(-)
diff --git a/config.h.void b/config.h.void
@@ -69,14 +69,19 @@ static const MonitorRule monrules[] = {
/* example of a HiDPI laptop monitor:
{ "eDP-1", 0.5f, 1, 2, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
*/
+ /* Monitors on Work PC dongle: */
+ { "DP-6", 0.55f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_90, 1920, 0 },
+ { "DP-5", 0.55f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, 0, 400 },
/* defaults */
+ { "HEADLESS-1", 0.55f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, 0, 0 },
{ NULL, 0.55f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
};
/* keyboard */
static const struct xkb_rule_names xkb_rules = {
/* can specify fields: rules, model, layout, variant, options */
- .options = "ctrl:nocaps",
+ //.options = "ctrl:nocaps",
+ .options = NULL,
};
static const int repeat_rate = 25;
@@ -144,12 +149,22 @@ static const char *menucmd[] = { "wmenu-run", "-f", "Victor Mono Bold 10", "-N",
static const char *volumedowncmd[] = { "pamixer", "-d", "5", NULL };
static const char *volumeupcmd[] = { "pamixer", "-i", "5", NULL };
static const char *volumemutecmd[] = { "pamixer", "-t", NULL };
+static const char *nextcmd[] = { "playerctl", "next", NULL };
+static const char *prevcmd[] = { "playerctl", "previous", NULL };
+static const char *playpausecmd[] = { "playerctl", "play-pause", NULL };
+static const char *browsercmd[] = { "brave", NULL };
+static const char *emacscmd[] = { "emacsclient", "-c", NULL };
+static const char *rdpcmd[] = { "winvmrdp", NULL };
static const Key keys[] = {
/* Note that Shift changes certain key codes: c -> C, 2 -> at, etc. */
/* modifier key function argument */
+ /* Programs: */
{ MODKEY, XKB_KEY_d, spawn, {.v = menucmd} },
{ MODKEY, XKB_KEY_Return, spawn, {.v = termcmd} },
+ { MODKEY, XKB_KEY_w, spawn, {.v = rdpcmd} },
+ { MODKEY, XKB_KEY_e, spawn, {.v = emacscmd} },
+ /* General window management: */
{ MODKEY, XKB_KEY_b, togglebar, {0} },
{ MODKEY, XKB_KEY_j, focusstack, {.i = +1} },
{ MODKEY, XKB_KEY_k, focusstack, {.i = -1} },
@@ -157,22 +172,8 @@ static const Key keys[] = {
{ MODKEY, XKB_KEY_o, incnmaster, {.i = -1} },
{ MODKEY, XKB_KEY_h, setmfact, {.f = -0.05f} },
{ MODKEY, XKB_KEY_l, setmfact, {.f = +0.05f} },
- { MODKEY|WLR_MODIFIER_ALT, XKB_KEY_h, incgaps, {.i = +1 } },
- { MODKEY|WLR_MODIFIER_ALT, XKB_KEY_l, incgaps, {.i = -1 } },
- { MODKEY|WLR_MODIFIER_ALT|WLR_MODIFIER_SHIFT, XKB_KEY_H, incogaps, {.i = +1 } },
- { MODKEY|WLR_MODIFIER_ALT|WLR_MODIFIER_SHIFT, XKB_KEY_L, incogaps, {.i = -1 } },
- { MODKEY|WLR_MODIFIER_ALT|WLR_MODIFIER_CTRL, XKB_KEY_h, incigaps, {.i = +1 } },
- { MODKEY|WLR_MODIFIER_ALT|WLR_MODIFIER_CTRL, XKB_KEY_l, incigaps, {.i = -1 } },
- { MODKEY|WLR_MODIFIER_ALT, XKB_KEY_0, togglegaps, {0} },
- { MODKEY|WLR_MODIFIER_ALT|WLR_MODIFIER_SHIFT, XKB_KEY_parenright,defaultgaps, {0} },
- { MODKEY, XKB_KEY_y, incihgaps, {.i = +1 } },
- { MODKEY, XKB_KEY_o, incihgaps, {.i = -1 } },
- { MODKEY|WLR_MODIFIER_CTRL, XKB_KEY_y, incivgaps, {.i = +1 } },
- { MODKEY|WLR_MODIFIER_CTRL, XKB_KEY_o, incivgaps, {.i = -1 } },
- { MODKEY|WLR_MODIFIER_ALT, XKB_KEY_y, incohgaps, {.i = +1 } },
- { MODKEY|WLR_MODIFIER_ALT, XKB_KEY_o, incohgaps, {.i = -1 } },
- { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Y, incovgaps, {.i = +1 } },
- { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_O, incovgaps, {.i = -1 } },
+ { MODKEY, XKB_KEY_g, togglegaps, {0} },
+ { MODKEY|WLR_MODIFIER_ALT|WLR_MODIFIER_SHIFT, XKB_KEY_parenright, defaultgaps, {0} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, zoom, {0} },
{ MODKEY, XKB_KEY_Tab, view, {0} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Q, killclient, {0} },
@@ -180,8 +181,8 @@ static const Key keys[] = {
{ MODKEY, XKB_KEY_f, setlayout, {.v = &layouts[1]} },
{ MODKEY, XKB_KEY_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XKB_KEY_space, setlayout, {0} },
- { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_space, togglefloating, {0} },
- { MODKEY, XKB_KEY_e, togglefullscreen, {0} },
+ { MODKEY|WLR_MODIFIER_CTRL, XKB_KEY_space, togglefloating, {0} },
+ { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_F, togglefullscreen, {0} },
{ MODKEY, XKB_KEY_0, view, {.ui = ~0} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_parenright, tag, {.ui = ~0} },
{ MODKEY, XKB_KEY_comma, focusmon, {.i = WLR_DIRECTION_LEFT} },
@@ -198,9 +199,18 @@ static const Key keys[] = {
TAGKEYS( XKB_KEY_8, XKB_KEY_asterisk, 7),
TAGKEYS( XKB_KEY_9, XKB_KEY_parenleft, 8),
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_C, quit, {0} },
+ /* Media controls: */
{ 0, XKB_KEY_XF86AudioLowerVolume, spawn, {.v = volumedowncmd} },
{ 0, XKB_KEY_XF86AudioRaiseVolume, spawn, {.v = volumeupcmd} },
- { 0, XKB_KEY_XF86AudioMute, spawn, {.v = volumemutecmd} },
+ { 0, XKB_KEY_XF86AudioMute, spawn, {.v = volumemutecmd} },
+ { 0, XKB_KEY_XF86AudioPlay, spawn, {.v = playpausecmd} },
+ { 0, XKB_KEY_XF86AudioNext, spawn, {.v = nextcmd} },
+ { 0, XKB_KEY_XF86AudioPrev, spawn, {.v = prevcmd} },
+ { MODKEY, XKB_KEY_minus, spawn, {.v = volumedowncmd} },
+ { MODKEY, XKB_KEY_equal, spawn, {.v = volumeupcmd} },
+ { MODKEY, XKB_KEY_slash, spawn, {.v = playpausecmd} },
+ { MODKEY, XKB_KEY_apostrophe, spawn, {.v = nextcmd} },
+ { MODKEY, XKB_KEY_semicolon, spawn, {.v = prevcmd} },
/* Ctrl-Alt-Backspace and Ctrl-Alt-Fx used to be handled by X server */
{ WLR_MODIFIER_CTRL|WLR_MODIFIER_ALT,XKB_KEY_Terminate_Server, quit, {0} },
diff --git a/dwl.c b/dwl.c
@@ -2070,7 +2070,11 @@ mapnotify(struct wl_listener *listener, void *data)
c->geom.height += 2 * c->bw;
/* Insert this client into client lists. */
- wl_list_insert(&clients, &c->link);
+ if (clients.prev) {
+ wl_list_insert(clients.prev, &c->link);
+ } else {
+ wl_list_insert(&clients, &c->link);
+ }
wl_list_insert(&fstack, &c->flink);
/* Set initial monitor, tags, floating status, and focus: