dwl: config.h adjustments - dotfiles - 🍚 personal arsenal of "rice"
HTML git clone https://git.drkhsh.at/dotfiles.git
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
DIR commit c19b3880b7f382dea7cfd4b764e5158479aad43f
DIR parent b0e10b73f57967c057e549b8d3cd103166e0a917
HTML Author: drkhsh <me@drkhsh.at>
Date: Wed, 2 Jul 2025 22:13:28 +0200
dwl: config.h adjustments
Diffstat:
M dwl/config.h | 104 ++++++++++++++++++++-----------
1 file changed, 68 insertions(+), 36 deletions(-)
---
DIR diff --git a/dwl/config.h b/dwl/config.h
@@ -16,42 +16,48 @@ static const int sloppyfocus = 1; /* focus follows mouse */
static const int bypass_surface_visibility = 0; /* 1 means idle inhibitors will disable idle tracking even if it's surface isn't visible */
static const int enablegaps = 1; /* 1 means gaps are enabled */
static const int smartgaps = 0; /* 1 means no outer gap when there is only one window */
-static const int monoclegaps = 1; /* 1 means outer gaps in monocle layout */
-static const unsigned int borderpx = 2; /* border pixel of windows */
+static const int monoclegaps = 0; /* 1 means outer gaps in monocle layout */
+static const unsigned int borderpx = 5; /* border pixel of windows */
+static const unsigned int systrayspacing = 2; /* systray spacing */
+static const int showsystray = 1; /* 0 means no systray */
+static const int showbar = 1; /* 0 means no bar */
+static const int topbar = 1; /* 0 means bottom bar */
+static const char *fonts[] = {"Terminess Nerd Font Mono:style=Regular:size=10"};
+static const float rootcolor[] = COLOR(0x222222ff);
static const unsigned int gappih = 10; /* horiz inner gap between windows */
static const unsigned int gappiv = 10; /* vert inner gap between windows */
static const unsigned int gappoh = 10; /* horiz outer gap between windows and screen edge */
static const unsigned int gappov = 10; /* vert outer gap between windows and screen edge */
-static const float rootcolor[] = COLOR(0x222222ff);
-static const float bordercolor[] = COLOR(0x444444ff);
-static const float focuscolor[] = COLOR(0xf57800ff);
-static const float urgentcolor[] = COLOR(0xff0000ff);
/* This conforms to the xdg-protocol. Set the alpha to zero to restore the old behavior */
static const float fullscreen_bg[] = {0.1f, 0.1f, 0.1f, 1.0f}; /* You can also use glsl colors */
-static int enableautoswallow = 0; /* enables autoswallowing newly spawned clients */
-static float swallowborder = 1.0f; /* add this multiplied by borderpx to border when a client is swallowed */
+static uint32_t colors[][3] = {
+ /* fg bg border */
+ [SchemeNorm] = { 0xbbbbbbff, 0x000000ff, 0x000000ff },
+ [SchemeSel] = { 0x000000ff, 0x717378ff, 0x717378ff },
+ [SchemeUrg] = { 0, 0xfb3310ff, 0xfb3310ff },
+};
/* tagging - TAGCOUNT must be no greater than 31 */
-#define TAGCOUNT (9)
+static char *tags[] = { "一", "二", "三", "四", "五", "六", "七", "八", "九" };
+#define TAGCOUNT 9
/* logging */
static int log_level = WLR_ERROR;
/* NOTE: ALWAYS keep a rule declared even if you don't use rules (e.g leave at least one example) */
static const Rule rules[] = {
- /* app_id title tags mask isfloating isterm noswallow monitor */
- /* examples: */
- { "Gimp", NULL, 0, 1, 0, 0, -1 }, /* Start on currently visible tags floating, not tiled */
- { "pavucontrol", NULL, 0, 1, 0, 0, -1 }, /* Start on currently visible tags floating, not tiled */
- { "Pinentry-gtk-2", NULL, 0, 1, 0, 0, -1 }, /* Start on currently visible tags floating, not tiled */
- { "Pinentry-gnome-3", NULL, 0, 1, 0, 0, -1 }, /* Start on currently visible tags floating, not tiled */
- { "Pinentry-gnome", NULL, 0, 1, 0, 0, -1 }, /* Start on currently visible tags floating, not tiled */
- { "Pinentry", NULL, 0, 1, 0, 0, -1 }, /* Start on currently visible tags floating, not tiled */
- { "Gcr-prompter", NULL, 0, 1, 0, 0, -1 }, /* Start on currently visible tags floating, not tiled */
- { "Zenity", NULL, 0, 1, 0, 0, -1 }, /* Start on currently visible tags floating, not tiled */
- { "Drawterm", NULL, 0, 1, 0, 0, -1 }, /* Start on currently visible tags floating, not tiled */
- { "Tor Browser", NULL, 0, 1, 0, 0, -1 }, /* Start on currently visible tags floating, not tiled */
- { "foot", NULL, 0, 0, 0, 1, -1 }, /* Start on currently visible tags floating, not tiled */
+ /* app_id title tags mask isfloating monitor */
+ { "Gimp", NULL, 0, 1, -1 },
+ { "pavucontrol", NULL, 0, 1, -1 },
+ { "Pinentry-gtk-2", NULL, 0, 1, -1 },
+ { "Pinentry-gnome-3", NULL, 0, 1, -1 },
+ { "Pinentry-gnome", NULL, 0, 1, -1 },
+ { "Pinentry", NULL, 0, 1, -1 },
+ { "Gcr-prompter", NULL, 0, 1, -1 },
+ { "Zenity", NULL, 0, 1, -1 },
+ { "Drawterm", NULL, 0, 1, -1 },
+ { "Tor Browser", NULL, 0, 1, -1 },
+ { "foot", NULL, 0, 0, -1 },
};
/* layout(s) */
@@ -81,10 +87,7 @@ static const MonitorRule monrules[] = {
/* keyboard */
static const struct xkb_rule_names xkb_rules = {
/* can specify fields: rules, model, layout, variant, options */
- /* example:
.options = "ctrl:nocaps",
- */
- .options = NULL,
.layout = "de",
};
@@ -148,24 +151,28 @@ static const enum libinput_config_tap_button_map button_map = LIBINPUT_CONFIG_TA
/* commands */
static const char *termcmd[] = { "foot", NULL };
-static const char *menucmd[] = { "fuzzel", NULL };
+static const char *dmenucmd[] = { "wmenu-run", "-p", "❯ ", "-N", "000000", "-n", "bbbbbb", "-M", "717378", "-m", "000000", "-S", "717378", "-s", "000000" };
static const char *passcmd[] = { "pass.dmenu", NULL };
static const char *emojicmd[] = { "emoji-dmenu", NULL };
-static const char *yubicmd[] = { "yubikey-oath-dmenu", "--clipboard", "--menu-cmd", "fuzzel", "--dmenu", "--prompt", "'🔒 credentials: '", NULL };
-static const char *lockcmd[] = { "glitchlock", "--font", "dos437", "--font-size", "14", NULL };
+static const char *yubicmd[] = { "yubikey-oath-dmenu", "--clipboard", "--menu-cmd", "wmenu -f 'FixedsysCore Nerd Font Mono 10' -p ' '", NULL };
+static const char *lockcmd[] = { "glitchlock-wl", "--font", "dos437", "--font-size", "14", NULL };
static const char *up_vol[] = { "pactl", "set-sink-volume", "@DEFAULT_SINK@", "+10%", NULL };
static const char *down_vol[] = { "pactl", "set-sink-volume", "@DEFAULT_SINK@", "-10%", NULL };
static const char *mute_vol[] = { "pactl", "set-sink-mute", "@DEFAULT_SINK@", "toggle", NULL };
static const char *screenshot[] = { "screenshot", NULL };
static const char *screenshotsel[] = { "screenshot-sel", NULL };
+static const char *up_brightness[] = { "brightnessctl", "set", "+10%" };
+static const char *down_brightness[] = { "brightnessctl", "set", "10%-" };
+static const char *windowswitch[] = { "wl-switcher", NULL };
static const Key keys[] = {
/* Note that Shift changes certain key codes: c -> C, 2 -> at, etc. */
/* modifier key function argument */
- { MODKEY, XKB_KEY_p, spawn, {.v = menucmd} },
+ { MODKEY, XKB_KEY_p, spawn, {.v = dmenucmd} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_P, spawn, {.v = passcmd} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_E, spawn, {.v = emojicmd} },
- { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Y, spawn, {.v = yubicmd} },
+ { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_K, spawn, {.v = yubicmd} },
+ { MODKEY, XKB_KEY_w, spawn, {.v = windowswitch} },
{ MODKEY, XKB_KEY_x, spawn, {.v = lockcmd} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, spawn, {.v = termcmd} },
{ 0, XKB_KEY_Print, spawn, {.v = screenshot} },
@@ -173,6 +180,8 @@ static const Key keys[] = {
{ 0, XKB_KEY_XF86AudioMute, spawn, {.v = mute_vol } },
{ 0, XKB_KEY_XF86AudioLowerVolume, spawn, {.v = down_vol } },
{ 0, XKB_KEY_XF86AudioRaiseVolume, spawn, {.v = up_vol } },
+ { 0, XKB_KEY_XF86MonBrightnessUp, spawn, {.v = up_brightness } },
+ { 0, XKB_KEY_XF86MonBrightnessDown,spawn, {.v = down_brightness } },
{ MODKEY, XKB_KEY_b, togglebar, {0} },
{ MODKEY, XKB_KEY_j, focusstack, {.i = +1} },
{ MODKEY, XKB_KEY_k, focusstack, {.i = -1} },
@@ -182,9 +191,24 @@ static const Key keys[] = {
{ MODKEY, XKB_KEY_l, setmfact, {.f = +0.05f} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_H, setcfact, {.f = +0.25f} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_L, setcfact, {.f = -0.25f} },
+ { 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_Return, zoom, {0} },
{ MODKEY, XKB_KEY_Tab, view, {0} },
- { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_G, togglegaps, {0} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_C, killclient, {0} },
{ MODKEY, XKB_KEY_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XKB_KEY_f, setlayout, {.v = &layouts[1]} },
@@ -193,8 +217,6 @@ static const Key keys[] = {
{ MODKEY, XKB_KEY_space, setlayout, {0} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_space, togglefloating, {0} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_F, togglefullscreen, {0} },
- { MODKEY, XKB_KEY_a, toggleswallow, {0} },
- { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_A, toggleautoswallow,{0} },
{ MODKEY, XKB_KEY_0, view, {.ui = ~0} },
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_equal, tag, {.ui = ~0} },
{ MODKEY, XKB_KEY_comma, focusmon, {.i = WLR_DIRECTION_LEFT} },
@@ -223,7 +245,17 @@ static const Key keys[] = {
};
static const Button buttons[] = {
- { MODKEY, BTN_LEFT, moveresize, {.ui = CurMove} },
- { MODKEY, BTN_MIDDLE, togglefloating, {0} },
- { MODKEY, BTN_RIGHT, moveresize, {.ui = CurResize} },
+ { ClkLtSymbol, 0, BTN_LEFT, setlayout, {.v = &layouts[0]} },
+ { ClkLtSymbol, 0, BTN_RIGHT, setlayout, {.v = &layouts[2]} },
+ { ClkTitle, 0, BTN_MIDDLE, zoom, {0} },
+ { ClkStatus, 0, BTN_MIDDLE, spawn, {.v = termcmd} },
+ { ClkClient, MODKEY, BTN_LEFT, moveresize, {.ui = CurMove} },
+ { ClkClient, MODKEY, BTN_MIDDLE, togglefloating, {0} },
+ { ClkClient, MODKEY, BTN_RIGHT, moveresize, {.ui = CurResize} },
+ { ClkTagBar, 0, BTN_LEFT, view, {0} },
+ { ClkTagBar, 0, BTN_RIGHT, toggleview, {0} },
+ { ClkTagBar, MODKEY, BTN_LEFT, tag, {0} },
+ { ClkTagBar, MODKEY, BTN_RIGHT, toggletag, {0} },
+ { ClkTray, 0, BTN_LEFT, trayactivate, {0} },
+ { ClkTray, 0, BTN_RIGHT, traymenu, {0} },
};