Rename the dunstctl sub-command 'status' to 'count'
This commit is contained in:
parent
5b81b43aa6
commit
4d74c7b46e
@ -29,6 +29,11 @@ Close all notifications currently being displayed
|
|||||||
Open the context menu, presenting all available actions and urls for the
|
Open the context menu, presenting all available actions and urls for the
|
||||||
currently open notifications.
|
currently open notifications.
|
||||||
|
|
||||||
|
=item B<count> [displayed/history/waiting]
|
||||||
|
|
||||||
|
Returns the number of displayed, shown and waiting notifications. If no argument
|
||||||
|
is provided, everything will be printed.
|
||||||
|
|
||||||
=item B<history-pop>
|
=item B<history-pop>
|
||||||
|
|
||||||
Redisplay the notification that was most recently closed. This can be called
|
Redisplay the notification that was most recently closed. This can be called
|
||||||
@ -46,11 +51,6 @@ Set the paused status of dunst. If false, dunst is running normally, if true,
|
|||||||
dunst is paused. See the is-paused command and the dunst man page for more
|
dunst is paused. See the is-paused command and the dunst man page for more
|
||||||
information.
|
information.
|
||||||
|
|
||||||
=item B<status> [displayed/history/waiting]
|
|
||||||
|
|
||||||
Returns the number of displayed, shown and waiting notifications. If no argument
|
|
||||||
is provided, everything will be printed.
|
|
||||||
|
|
||||||
=item B<debug>
|
=item B<debug>
|
||||||
|
|
||||||
Tries to contact dunst and checks for common faults between dunstctl and dunst.
|
Tries to contact dunst and checks for common faults between dunstctl and dunst.
|
||||||
|
24
dunstctl
24
dunstctl
@ -20,10 +20,10 @@ show_help() {
|
|||||||
close Close the last notification
|
close Close the last notification
|
||||||
close-all Close the all notifications
|
close-all Close the all notifications
|
||||||
context Open context menu
|
context Open context menu
|
||||||
|
count [displayed|history|waiting] Show the number of notifications
|
||||||
history-pop Pop one notification from history
|
history-pop Pop one notification from history
|
||||||
is-paused Check if dunst is running or paused
|
is-paused Check if dunst is running or paused
|
||||||
set-paused [true|false|toggle] Set the pause status
|
set-paused [true|false|toggle] Set the pause status
|
||||||
status [displayed|history|waiting] Show the number of notifications
|
|
||||||
debug Print debugging information
|
debug Print debugging information
|
||||||
help Show this help
|
help Show this help
|
||||||
EOH
|
EOH
|
||||||
@ -62,6 +62,17 @@ case "${1:-}" in
|
|||||||
"context")
|
"context")
|
||||||
method_call "${DBUS_IFAC_DUNST}.ContextMenuCall" >/dev/null
|
method_call "${DBUS_IFAC_DUNST}.ContextMenuCall" >/dev/null
|
||||||
;;
|
;;
|
||||||
|
"count")
|
||||||
|
[ $# -eq 1 ] || [ "${2}" = "displayed" ] || [ "${2}" = "history" ] || [ "${2}" = "waiting" ] \
|
||||||
|
|| die "Please give either 'displayed', 'history', 'waiting' or none as count parameter."
|
||||||
|
if [ $# -eq 1 ]; then
|
||||||
|
property_get waiting | ( read -r _ _ waiting; printf " Waiting: %s\n" "${waiting}" )
|
||||||
|
property_get displayed | ( read -r _ _ displayed; printf " Currently displayed: %s\n" "${displayed}" )
|
||||||
|
property_get history | ( read -r _ _ history; printf " History: %s\n" "${history}")
|
||||||
|
else
|
||||||
|
property_get ${2} | ( read -r _ _ notifications; printf "%s\n" "${notifications}"; )
|
||||||
|
fi
|
||||||
|
;;
|
||||||
"history-pop")
|
"history-pop")
|
||||||
method_call "${DBUS_IFAC_DUNST}.NotificationShow" >/dev/null
|
method_call "${DBUS_IFAC_DUNST}.NotificationShow" >/dev/null
|
||||||
;;
|
;;
|
||||||
@ -84,17 +95,6 @@ case "${1:-}" in
|
|||||||
property_set paused variant:boolean:"$2"
|
property_set paused variant:boolean:"$2"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"status")
|
|
||||||
[ $# -eq 1 ] || [ "${2}" = "displayed" ] || [ "${2}" = "history" ] || [ "${2}" = "waiting" ] \
|
|
||||||
|| die "Please give either 'displayed', 'history', 'waiting' or none as status parameter."
|
|
||||||
if [ $# -eq 1 ]; then
|
|
||||||
property_get waiting | ( read -r _ _ waiting; printf " Waiting: %s\n" "${waiting}" )
|
|
||||||
property_get displayed | ( read -r _ _ displayed; printf " Currently displayed: %s\n" "${displayed}" )
|
|
||||||
property_get history | ( read -r _ _ history; printf " History: %s\n" "${history}")
|
|
||||||
else
|
|
||||||
property_get ${2} | ( read -r _ _ notifications; printf "%s\n" "${notifications}"; )
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
"help"|"--help"|"-h")
|
"help"|"--help"|"-h")
|
||||||
show_help
|
show_help
|
||||||
;;
|
;;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user