summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xbin/rcmenu15
1 files changed, 8 insertions, 7 deletions
diff --git a/bin/rcmenu b/bin/rcmenu
index 950c82c..4d66ea5 100755
--- a/bin/rcmenu
+++ b/bin/rcmenu
@@ -3,7 +3,8 @@
 set -e
 [ -n "$DEBUG" ] && set -x
 
-export MENU_PROMPT="> rc"
+export MENU_PROMPT="󰑮 rc"
+ico=/usr/share/icons/mdi/scalable/run-fast.svg
 
 handle() {
 	while read -r line; do
@@ -13,15 +14,15 @@ handle() {
 		[ "${mode}" = "started" ] && act=stop
 		_outp=$(doas rc-service "${svc}" "${act}")
 		if [ $? = 0 ]; then
-			notify-send -a rc rc "${_outp}"
+			notify-send -i "${ico}" -a rc rc "${_outp}"
 		else
-			notify-send -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 rc "${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 \
-	| handle
+rc-status --servicelist |
+	awk '{printf "%25s\t%s\n", $1, $3}' |
+	menu --list=10 |
+	handle