summaryrefslogtreecommitdiff
path: root/tools/steam-dmenu.sh
diff options
context:
space:
mode:
authorauric <104602845+ihateamongus@users.noreply.github.com>2025-09-11 10:13:32 -0500
committerGitHub <noreply@github.com>2025-09-11 10:13:32 -0500
commite58f13a6d7db7d046933d72ccafebbb0fb58202d (patch)
tree7a9c34c03c87e684079c8bd196bdf19cadebcbf3 /tools/steam-dmenu.sh
parent0408cb4803e0b2c82affb16e2eac8dfd73895343 (diff)
parentb9b34f91138c7b1cc2bc54571d1522c85cb581cd (diff)
Merge pull request #25 from ihateamongus/codex/create-universal-launcher-with-dmenu
feat: add universal dmenu launcher
Diffstat (limited to 'tools/steam-dmenu.sh')
-rwxr-xr-xtools/steam-dmenu.sh9
1 files changed, 9 insertions, 0 deletions
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 &