dmenu/dmenu_run.sh
2025-03-04 14:58:11 +03:00

14 lines
275 B
Bash
Executable File

#!/bin/bash
FILE="$HOME/.config/suckless_desktop/win_r.txt"
if [ ! -f "$FILE" ]; then
echo "File not found: $FILE" >&2
exit 1
fi
sed 's/|/'$'\t''/' "$FILE" | dmenu | {
IFS=$'\t' read -r col1 col2
[ -z "$col2" ] && exit 0
eval "$col2" 2>/dev/null || :
}