dmenu/dmenu_run.sh

14 lines
276 B
Bash
Raw Normal View History

2025-03-03 21:03:22 +00:00
#!/bin/bash
FILE="$HOME/.local/share/dmenu_applications.tsv"
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 || :
}