Updated to work with my other project.

This commit is contained in:
Crony Akatsuki 2022-07-01 17:24:08 +02:00
parent 265db93195
commit e1a9b14f8c

View File

@ -3,7 +3,7 @@
# dmenu script to open up my games # dmenu script to open up my games
get_category () { get_category () {
category=$( game-run --list categories | dmenu -p "Choose game category:") category=$( game-run list | dmenu -p "Choose game category:")
[ -z "$category" ] && exit 0 [ -z "$category" ] && exit 0
} }
@ -14,9 +14,9 @@ while [ -z "$game" ]
do do
if [ -z "$1" ]; then if [ -z "$1" ]; then
game=$(game-run --list $category | sed '/-18+/d' | dmenu -p "Choose game to run:") game=$(game-run list $category | sed '/-18+/d' | dmenu -p "Choose game to run:")
elif [ "$1" = "-a" ]; then elif [ "$1" = "-a" ]; then
game=$(game-run --list $category | dmenu -p "Choose game to run:") game=$(game-run list $category | dmenu -p "Choose game to run:")
else else
printf '%s\n' "Option $1 doesn't exit!!" printf '%s\n' "Option $1 doesn't exit!!"
exit 1 exit 1
@ -25,7 +25,7 @@ do
[ -z "$game" ] && get_category [ -z "$game" ] && get_category
done done
if game-run "$game"; then if game-run launch "$game"; then
quick-notify "Game run" "Launching $game" quick-notify "Game run" "Launching $game"
else else
quick-notify "Game run" "Failed to launch $game" quick-notify "Game run" "Failed to launch $game"