[Linux] Add prompt and columns to rofi_systemd.sh

This commit is contained in:
Ivan Malison 2017-03-11 14:59:55 -08:00
parent bd094e7cd3
commit 2e8c2613e9
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -1,4 +1,4 @@
#!/usr/bin/env zsh #!/usr/bin/env sh
export SYSTEMD_COLORS=0 export SYSTEMD_COLORS=0
@ -18,7 +18,7 @@ stop="Alt+k"
restart="Alt+r" restart="Alt+r"
function select_service_and_act { function select_service_and_act {
selection=$(rofi -dmenu -i \ selection=$(rofi -dmenu -i -p "systemd unit: " \
-kb-custom-1 "${enable}" \ -kb-custom-1 "${enable}" \
-kb-custom-2 "${disable}" \ -kb-custom-2 "${disable}" \
-kb-custom-3 "${stop}" \ -kb-custom-3 "${stop}" \
@ -55,4 +55,4 @@ function select_service_and_act {
esac esac
} }
{ user_units; system_units } | select_service_and_act { user_units; system_units; } | column -tc 1 | select_service_and_act