From 2e301b1d39287939626288b1804743ca0f7ab477 Mon Sep 17 00:00:00 2001 From: mrossinek Date: Fri, 1 May 2020 21:35:08 +0200 Subject: [PATCH] Fix indentation and use tabs for indents --- dunstctl | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/dunstctl b/dunstctl index a8bc1fa..7d09f02 100755 --- a/dunstctl +++ b/dunstctl @@ -45,11 +45,11 @@ property_set() { } invert_boolean() { - if [ "${1}" = "true" ]; then - printf "%s\n" "false" - elif [ "${1}" = "false" ]; then - printf "%s\n" "true" - fi + if [ "${1}" = "true" ]; then + printf "%s\n" "false" + elif [ "${1}" = "false" ]; then + printf "%s\n" "true" + fi } command -v dbus-send >/dev/null 2>/dev/null || \ @@ -73,28 +73,28 @@ case "${1:-}" in method_call "${DBUS_IFAC_DUNST}.NotificationShow" >/dev/null ;; "is-paused") - running=$(property_get running | ( read -r _ _ running; printf "%s\n" "${running}"; )) - # invert boolean to indiciate pause status rather than running one - paused=$(invert_boolean "${running}") - printf "%s\n" "${paused}" + running=$(property_get running | ( read -r _ _ running; printf "%s\n" "${running}"; )) + # invert boolean to indiciate pause status rather than running one + paused=$(invert_boolean "${running}") + printf "%s\n" "${paused}" ;; "set-paused") [ "${2:-}" ] \ || die "No status parameter specified. Please give either 'true', 'false' or 'toggle' as paused parameter." [ "${2}" = "true" ] || [ "${2}" = "false" ] || [ "${2}" = "toggle" ] \ || die "Please give either 'true', 'false' or 'toggle' as paused parameter." - if [ "${2}" = "toggle" ]; then - running=$(property_get running | ( read -r _ _ running; printf "%s\n" "${running}"; )) - if [ "${running}" = "true" ]; then - property_set running variant:boolean:false - else - property_set running variant:boolean:true - fi - else - # invert boolean to indiciate running status rather than pause one - running=$(invert_boolean "${2}") - property_set running variant:boolean:"${running}" - fi + if [ "${2}" = "toggle" ]; then + running=$(property_get running | ( read -r _ _ running; printf "%s\n" "${running}"; )) + if [ "${running}" = "true" ]; then + property_set running variant:boolean:false + else + property_set running variant:boolean:true + fi + else + # invert boolean to indiciate running status rather than pause one + running=$(invert_boolean "${2}") + property_set running variant:boolean:"${running}" + fi ;; "help"|"--help"|"-h") show_help