Files
nix/scripts/open-game.sh
2025-10-14 15:07:10 +03:00

13 lines
299 B
Bash
Executable File

#!/usr/bin/env bash
GAMES=$(cat ~/config/scripts/lib/games.txt)
SELECTED=$(echo "$GAMES" | cut -d'%' -f1 | wofi --show dmenu -p "Play something...")
if [ -n "$SELECTED" ]; then
PLACE_ID=$(echo "$GAMES" | grep "^$SELECTED" | sed 's/.*%%% //')
if [ -n "$PLACE_ID" ]; then
exec $PLACE_ID
fi
fi