swaync-service-dispatcher: add up/down options

This commit is contained in:
2024-07-24 11:49:15 +00:00
parent 15df9edca1
commit 490c587737

View File

@@ -9,10 +9,11 @@ usage() {
echo "swaync-service-dispatcher <action> <service>" echo "swaync-service-dispatcher <action> <service>"
echo "" echo ""
echo "actions:" echo "actions:"
echo "- swaync-service-dispatcher print <service>" echo "- print <service>"
echo " - prints 'true' or 'false' based on if the service is wanted-up (i.e. started or starting)" echo " prints 'true' or 'false' based on if the service is wanted-up (i.e. started or starting)"
echo "- swaync-service-dispatcher toggle <service>" echo "- up <service>"
echo " - if the service is up, takes it down, and vice versa" echo "- down <service>"
echo "- toggle <service>"
exit 1 exit 1
} }
@@ -58,6 +59,13 @@ case "$action" in
;; ;;
esac esac
;; ;;
# these aren't needed by swaync; just handy because i can never remember how to use s6
(up)
startService
;;
(down)
stopService
;;
(*) (*)
usage usage
;; ;;