dmenu-scripts/dmenu-games

21 lines
453 B
Plaintext
Raw Normal View History

2022-04-22 12:48:51 +02:00
#!/bin/sh
2021-05-01 09:12:33 +02:00
2022-04-22 12:48:51 +02:00
# dmenu script to open up my games
2022-04-05 16:59:13 +02:00
2022-05-22 19:36:32 +02:00
list=$( game-run --list categories | dmenu -p "Choose game category:")
2021-05-01 09:12:33 +02:00
2022-05-22 19:36:32 +02:00
[ -z "$list" ] && exit 0
if [ -z "$1" ]; then
game=$(game-run --list $list | sed '/-18+/d' | dmenu -p "Choose game to run:")
elif [ "$1" = "-a" ]; then
game=$(game-run --list $list | dmenu -p "Choose game to run:")
else
printf '%s\n' "Option $1 doesn't exit!!"
exit 1
fi
[ -z "$game" ] && exit 0
game-run "$game"