From 9f8f5640f04386fbd79ebe40d9911d32dbf4b146 Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Fri, 4 Nov 2022 12:07:11 +0100 Subject: bin/rcmenu: add prompt and surface all of rc-status --- bin/rcmenu | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bin') 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${_outp}" + notify-send -i "${ico}" -a rc -u critical -t 30000 "${MENU_PROMPT}: ${svc}" "${act}ing ${svc} failed:\n${_outp}" 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 -- cgit 1.4.1