summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorauric <104602845+ihateamongus@users.noreply.github.com>2025-09-11 10:45:46 -0500
committerauric <104602845+ihateamongus@users.noreply.github.com>2025-09-11 10:45:46 -0500
commit2341d8444599f7bd350d6e12d2f48fe4cecc819d (patch)
tree7a1bd6d796fb7ff3d4ce55c3ee5163ada5873c73 /tools
parent0408cb4803e0b2c82affb16e2eac8dfd73895343 (diff)
feat: enlarge dmenu input and add dwm power binds
Diffstat (limited to 'tools')
-rwxr-xr-xtools/power-menu.sh17
-rwxr-xr-xtools/steam-dmenu.sh9
-rwxr-xr-xtools/universal_launcher.sh17
-rw-r--r--tools/universal_launcher.txt7
4 files changed, 50 insertions, 0 deletions
diff --git a/tools/power-menu.sh b/tools/power-menu.sh
new file mode 100755
index 0000000..e3b5c63
--- /dev/null
+++ b/tools/power-menu.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+# simple power menu using dmenu
+choice=$(printf '%s\n' lock reboot shutdown | dmenu -i -l 5)
+case "$choice" in
+ lock)
+ slock &
+ ;;
+ reboot)
+ loginctl reboot
+ ;;
+ shutdown)
+ loginctl poweroff
+ ;;
+ *)
+ exit 0
+ ;;
+esac
diff --git a/tools/steam-dmenu.sh b/tools/steam-dmenu.sh
new file mode 100755
index 0000000..286d312
--- /dev/null
+++ b/tools/steam-dmenu.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+# steam game launcher using dmenu
+appdir="$HOME/.local/share/Steam/steamapps"
+[ -d "$appdir" ] || exit 1
+list=$(find "$appdir" -name '*.acf' -print0 | \
+ xargs -0 -I{} awk -F '"' '/"name"/{name=$4}/"appid"/{printf "%s:%s\n",name,$4}' {} )
+choice=$(printf '%s' "$list" | sort | dmenu -i -l 20)
+appid=$(printf '%s' "$choice" | cut -d: -f2)
+[ -n "$appid" ] && steam -applaunch "$appid" >/dev/null 2>&1 &
diff --git a/tools/universal_launcher.sh b/tools/universal_launcher.sh
new file mode 100755
index 0000000..2cedc59
--- /dev/null
+++ b/tools/universal_launcher.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+# universal dmenu launcher
+choice=$(printf '%s\n' Run Steam Power | dmenu -i -l 10)
+case "$choice" in
+ Run)
+ dmenu_run &
+ ;;
+ Steam)
+ "$(dirname "$0")/steam-dmenu.sh"
+ ;;
+ Power)
+ "$(dirname "$0")/power-menu.sh"
+ ;;
+ *)
+ exit 0
+ ;;
+ esac
diff --git a/tools/universal_launcher.txt b/tools/universal_launcher.txt
new file mode 100644
index 0000000..8bfd9a4
--- /dev/null
+++ b/tools/universal_launcher.txt
@@ -0,0 +1,7 @@
+Universal launcher notes:
+- Added `universal_launcher.sh` script providing Run, Steam, and Power menus via dmenu.
+- Added `steam-dmenu.sh` to list installed Steam games and launch them.
+- Added `power-menu.sh` for locking, rebooting, and shutting down.
+- Patched dmenu to center on screen, size dynamically, draw a 3px accent-colored border and separators, and update colors from accent.h.
+- Enlarged dmenu's input field and added an accent divider beneath it.
+- Added dwm keybindings: `Mod+Shift+p` for the power menu and `Mod+Ctrl+p` for the Steam launcher.