diff --git a/dotfiles/lib/bin/rofi_systemd.sh b/dotfiles/lib/bin/rofi_systemd.sh index cee1ef09..da2574b3 100755 --- a/dotfiles/lib/bin/rofi_systemd.sh +++ b/dotfiles/lib/bin/rofi_systemd.sh @@ -18,13 +18,14 @@ stop="Alt+k" restart="Alt+r" function select_service_and_act { - selection=$(rofi -dmenu -i -p "systemd unit: " \ + result=$(rofi -dmenu -i -p "systemd unit: " \ -kb-custom-1 "${enable}" \ -kb-custom-2 "${disable}" \ -kb-custom-3 "${stop}" \ - -kb-custom-4 "${restart}" | sed -n 's/ \+/ /gp') + -kb-custom-4 "${restart}") rofi_exit="$?" + selection="$(echo $result | sed -n 's/ \+/ /gp')" action="restart" case "$rofi_exit" in