From 763748c252f2fea95e8059eddd912a84b3304220 Mon Sep 17 00:00:00 2001 From: Niklas Date: Mon, 15 Jun 2020 16:50:43 +0200 Subject: [PATCH] moved the rofi quick action script to config --- .config/rofi/rofi-quick-action.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 .config/rofi/rofi-quick-action.sh diff --git a/.config/rofi/rofi-quick-action.sh b/.config/rofi/rofi-quick-action.sh new file mode 100755 index 0000000..0dcf2d4 --- /dev/null +++ b/.config/rofi/rofi-quick-action.sh @@ -0,0 +1,18 @@ +#!/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 +