add thingmenu - dotfiles - dark dots
HTML git clone https://git.drkhsh.at/dotfiles
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
DIR commit e051ced54004f6a4fbc89a544c976c8fb9fb8aee
DIR parent bee9f54c2bcef8184e1faddb585888e6175e6095
HTML Author: drkhsh <me@drkhsh.at>
Date: Thu, 9 Oct 2025 15:25:21 +0200
add thingmenu
Diffstat:
A bin/.local/bin/thingmenu-menu.sh | 28 ++++++++++++++++++++++++++++
M dwm/config.h | 33 ++++++++++++++++++-------------
2 files changed, 47 insertions(+), 14 deletions(-)
---
DIR diff --git a/bin/.local/bin/thingmenu-menu.sh b/bin/.local/bin/thingmenu-menu.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+ARGS="-n -g +400+400"
+
+case "$1" in
+ "fn")
+ thingmenu $ARGS -- \
+ "backlight +10%" "xbacklight -inc 10%" \
+ "backlight -10%" "xbacklight -dec 10%" \
+ "screen off" "sleep 1; xset dpms force off" \
+ "suspend" "pm-suspend || systemctl suspend" \
+ "<---" "$0"
+ ;;
+ "sound")
+ thingmenu $ARGS -- \
+ "volume +10%" "vol up" \
+ "volume -10%" "vol down" \
+ "toggle mute" "vol mute" \
+ "<---" "$0"
+ ;;
+ *)
+ thingmenu $ARGS -- \
+ "plumb" "plumb.sh" \
+ "fn" "$0 fn" \
+ "sound" "$0 sound" \
+ "kill" "xkill"
+ ;;
+esac
+
DIR diff --git a/dwm/config.h b/dwm/config.h
@@ -107,19 +107,21 @@ static const MonitorRule monrules[] = {
/* commands */
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
-static const char *dmenucmd[] = { "runmenu", NULL };
-static const char *termcmd[] = { "st", NULL };
-static const char *passdmenucmd[] = { "pass.dmenu", NULL };
-static const char *ykdmenucmd[] = { "yubimenu", NULL };
-static const char *emojicmd[] = { "emoji-dmenu", NULL };
-static const char *slockcmd[] = { "slock", NULL };
-static const char *dswitchcmd[] = { "dswitcher", NULL };
-static const char *up_vol[] = { "vol", "up", NULL };
-static const char *down_vol[] = { "vol", "down", NULL };
-static const char *mute_vol[] = { "vol", "mute", NULL };
-static const char *screenshot[] = { "screenshot", NULL };
-static const char *screenshotsel[] = { "screenshot-sel", NULL };
-static const char *plumbcmd[] = { "plumb.sh", NULL };
+static const char *dmenucmd[] = { "runmenu", NULL };
+static const char *thingmenucmd[] = { "thingmenu-menu.sh", NULL };
+static const char *termcmd[] = { "st", NULL };
+static const char *passdmenucmd[] = { "pass.dmenu", NULL };
+static const char *ykdmenucmd[] = { "yubimenu", NULL };
+static const char *emojicmd[] = { "emoji-dmenu", NULL };
+static const char *slockcmd[] = { "slock", NULL };
+static const char *dswitchcmd[] = { "dswitcher", NULL };
+static const char *up_vol[] = { "vol", "up", NULL };
+static const char *down_vol[] = { "vol", "down", NULL };
+static const char *mute_vol[] = { "vol", "mute", NULL };
+static const char *screenshot[] = { "screenshot", NULL };
+static const char *screenshotsel[] = { "screenshot-sel", NULL };
+static const char *plumbcmd[] = { "plumb.sh", NULL };
+static const char *dunstcmd[] = { "dunstctl", "close-all", NULL };
#include "tagallmon.c"
#include "movestack.c"
@@ -127,6 +129,7 @@ static const char *plumbcmd[] = { "plumb.sh", NULL };
static const Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
+ { MODKEY|ShiftMask, XK_m, spawn, {.v = thingmenucmd } },
{ MODKEY|ShiftMask, XK_p, spawn, {.v = passdmenucmd } },
{ MODKEY|ShiftMask, XK_y, spawn, {.v = ykdmenucmd } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
@@ -138,6 +141,7 @@ static const Key keys[] = {
{ 0, XKB_KEY_XF86AudioRaiseVolume, spawn, {.v = up_vol } },
{ 0, XK_Print, spawn, {.v = screenshot } },
{ ShiftMask, XK_Print, spawn, {.v = screenshotsel } },
+ { MODKEY, XK_space, spawn, {.v = dunstcmd } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
@@ -158,7 +162,6 @@ static const Key keys[] = {
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XK_g, setlayout, {.v = &layouts[3]} },
{ MODKEY|ShiftMask, XK_m, setlayout, {.v = &layouts[4]} },
- { MODKEY, XK_space, setlayout, {0} },
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
{ MODKEY, XK_y, togglefullscreen, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
@@ -193,6 +196,7 @@ static const Button buttons[] = {
{ ClkWinTitle, 0, Button4, focusstack, {.i = +1 } },
{ ClkWinTitle, 0, Button5, focusstack, {.i = -1 } },
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
+ { ClkStatusText, 0, Button3, spawn, {.v = dmenucmd } },
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
@@ -202,5 +206,6 @@ static const Button buttons[] = {
{ ClkTagBar, ControlMask, Button3, toggletag, {0} },
{ ClkTagBar, MODKEY, Button1, toggleview, {0} },
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
+ { ClkRootWin, 0, Button3, spawn, {.v = thingmenucmd } },
};