dotfiles-remastered/.config/rofi/rofi-quick-action.sh

19 lines
331 B
Bash
Raw Normal View History

#!/usr/bin/env sh
set -e
WORKINGDIR="$HOME/.config/rofi/"
MAP="$WORKINGDIR/cmd.csv"
cat "$MAP" \
| cut -d ',' -f 1 \
| rofi -dmenu -i -p "Quick " \
| head -n 1 \
| xargs -i --no-run-if-empty grep "{}" "$MAP" \
| cut -d ',' -f 2 \
| head -n 1 \
| xargs -i --no-run-if-empty /bin/bash -c "{}"
exit 0