From 52a00e9d297e698b417fc221e0013d7c10fdb39e Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Sun, 21 Aug 2022 17:13:40 +0200 Subject: [PATCH] Allow specifying further arguments in actions --- home/.config/lemonbar/lemonbar-launch | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/home/.config/lemonbar/lemonbar-launch b/home/.config/lemonbar/lemonbar-launch index 3c1c48c..24770ec 100755 --- a/home/.config/lemonbar/lemonbar-launch +++ b/home/.config/lemonbar/lemonbar-launch @@ -188,9 +188,11 @@ while read -r cmd <&5; do output="$(echo $cmd | cut -d " " -f2-)" if [[ "$prefix" == "cmd" ]]; then - cmd="${CMDS[$output]}" - >&2 echo "CMD: $output ($cmd)" - eval $cmd + key="$(echo $output | cut -d " " -f1)" + args="$(echo $output | cut -d " " -f2-)" + run_str="${CMDS[$key]} $args" + >&2 echo "CMD: $run_str ($key)" + eval $run_str continue fi