dmenu/dmenu_run.sh
Andreev Gregory ea3b0cbffe |
2025-03-25 11:17:04 +03:00

14 lines
280 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 || :
}