mirror of
https://github.com/CoolnsX/hyprdots.git
synced 2025-12-20 07:15:23 +05:30
21 lines
911 B
Bash
Executable File
21 lines
911 B
Bash
Executable File
#!/bin/sh
|
|
|
|
gamedir="$HOME/games"
|
|
|
|
games=$(find "$gamedir" -maxdepth 2 -type f -name '*.exe' -executable | sed "s|$gamedir/||g;/[U|u]nin.*/d")
|
|
|
|
[ -z "$games" ] && notify-send -e -u critical "No games installed" && exit 1
|
|
game=$(printf '%s\n' "$games" | bemenu --fn 'IBM Plex Sans 15' -i -c -W 0.5 -B 3 -p "PLAY GAME: " -l 15 -P ">> " --bdr="#$GLOBAL_ACCENT" --tf="#$GLOBAL_ACCENT" --hf="#$GLOBAL_ACCENT")
|
|
|
|
[ -z "$game" ] && notify-send -e -h "string:x-canonical-private-synchronous:${0##*/}" -u critical "No game selected" && exit 1
|
|
|
|
cd "$(dirname "$gamedir"/"$game")" || (notify-send -e -h "string:x-canonical-private-synchronous:${0##*/}" -u critical "Directory Not found" && exit 1)
|
|
|
|
gamename=$(basename "$game")
|
|
|
|
notify-send -e -h "string:x-canonical-private-synchronous:${0##*/}" -i "wine" "Launching $gamename"
|
|
|
|
trap 'wineserver -k' INT HUP
|
|
|
|
WINEFSYNC=1 WINEESYNC=1 MANGOHUD=1 gamemoderun wine "$gamename"
|