aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/menurun
diff options
context:
space:
mode:
authorYaroslav <contact@yaroslavps.com>2020-08-28 17:13:52 +0300
committerYaroslav <contact@yaroslavps.com>2020-08-28 17:13:52 +0300
commitdd41ab3a17f1b045e1537f00f3b7a499d2372804 (patch)
treeff26e8d943b034e1e730e59c8915ad2070248f5a /dotfiles/.local/bin/menurun
parentda8406fc71e6ef32cf77711b3550167cbc6efe6b (diff)
downloadswayrice-dd41ab3a17f1b045e1537f00f3b7a499d2372804.tar.gz
swayrice-dd41ab3a17f1b045e1537f00f3b7a499d2372804.zip
menurun: fix arguments not being sent in certain cases
Diffstat (limited to 'dotfiles/.local/bin/menurun')
-rwxr-xr-xdotfiles/.local/bin/menurun5
1 files changed, 3 insertions, 2 deletions
diff --git a/dotfiles/.local/bin/menurun b/dotfiles/.local/bin/menurun
index 8432279..4498687 100755
--- a/dotfiles/.local/bin/menurun
+++ b/dotfiles/.local/bin/menurun
@@ -15,6 +15,7 @@ case $1 in
title="Run in terminal:";;
esac
-action="$action $(compgen -c | sort -u | bemenu -p "$title" --tf="$BEMENU_TF" --tb="$BEMENU_NB" --fb="$BEMENU_NB" --fn="$BEMENU_FN" --nb="$BEMENU_NB" --nf="$BEMENU_NF" --hf="$BEMENU_HF" --hb="$BEMENU_HB" --monitor="$BEMENU_MONITOR")"
+program="$(compgen -c | sort -u | bemenu -p "$title" --tf="$BEMENU_TF" --tb="$BEMENU_NB" --fb="$BEMENU_NB" --fn="$BEMENU_FN" --nb="$BEMENU_NB" --nf="$BEMENU_NF" --hf="$BEMENU_HF" --hb="$BEMENU_HB" --monitor="$BEMENU_MONITOR")"
-$action
+[ -n "$action" ] && $action "$program" && exit 0
+$program