diff options
| author | Robert Günzler <r@gnzler.io> | 2022-11-04 12:07:11 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2022-11-18 18:37:23 +0100 |
| commit | 9f8f5640f04386fbd79ebe40d9911d32dbf4b146 (patch) | |
| tree | 6e765ec7a7056eef973804f96a70e65c37fdf588 /bin | |
| parent | 06529aa202e6240665313153ada2139f419b3fce (diff) | |
bin/rcmenu: add prompt and surface all of rc-status
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/rcmenu | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/rcmenu b/bin/rcmenu index 4d66ea5..0fce6f4 100755 --- a/bin/rcmenu +++ b/bin/rcmenu @@ -14,15 +14,15 @@ handle() { [ "${mode}" = "started" ] && act=stop _outp=$(doas rc-service "${svc}" "${act}") if [ $? = 0 ]; then - notify-send -i "${ico}" -a rc rc "${_outp}" + notify-send -i "${ico}" -a rc "${MENU_PROMPT}: ${svc}" "${_outp}" else - notify-send -i "${ico}" -a rc -u critical -t 30000 rc "${act}ing ${svc} failed:\n<i>${_outp}</i>" + notify-send -i "${ico}" -a rc -u critical -t 30000 "${MENU_PROMPT}: ${svc}" "${act}ing ${svc} failed:\n<i>${_outp}</i>" fi printf "%s\n" "${_outp}" done } rc-status --servicelist | - awk '{printf "%25s\t%s\n", $1, $3}' | menu --list=10 | + tr -d '[' | tr -d ']' | handle |