Rename status commands to running

This commit is contained in:
Nikos Tsipinakis 2020-04-14 11:34:18 +02:00
parent 94aa427a1b
commit 5aa1863762

View File

@ -21,8 +21,8 @@ show_help() {
close-all Close the all notifications close-all Close the all notifications
context Open context menu context Open context menu
history-pop Pop one notification from history history-pop Pop one notification from history
status Check if running Check if dunst is running or paused
status-set [true|false] Set the status set-running [true|false] Set the pause status
debug Print debugging information debug Print debugging information
help Show this help help Show this help
EOH EOH
@ -64,10 +64,10 @@ case "${1:-}" in
"history-pop") "history-pop")
method_call "${DBUS_IFAC_DUNST}.NotificationShow" >/dev/null method_call "${DBUS_IFAC_DUNST}.NotificationShow" >/dev/null
;; ;;
"status") "running")
property_get running | ( read -r _ _ status; printf "%s\n" "${status}"; ) property_get running | ( read -r _ _ paused; printf "%s\n" "${paused}"; )
;; ;;
"status-set") "set-running")
[ "${2:-}" ] \ [ "${2:-}" ] \
|| die "No status parameter specified. Please give either 'true' or 'false' as running parameter." || die "No status parameter specified. Please give either 'true' or 'false' as running parameter."
[ "${2}" = "true" ] || [ "${2}" = "false" ] \ [ "${2}" = "true" ] || [ "${2}" = "false" ] \