From 7f0c94e5821a1279f589345c95f3e43768198c28 Mon Sep 17 00:00:00 2001 From: Szymon P Date: Sat, 29 Mar 2025 10:02:20 +0100 Subject: [PATCH] Add .local/bin/check-do-not-disturb.sh --- .../bin/executable_check-do-not-disturb.sh | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 private_dot_local/bin/executable_check-do-not-disturb.sh diff --git a/private_dot_local/bin/executable_check-do-not-disturb.sh b/private_dot_local/bin/executable_check-do-not-disturb.sh new file mode 100644 index 0000000..6b6b60c --- /dev/null +++ b/private_dot_local/bin/executable_check-do-not-disturb.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +disturbed=$(makoctl mode | grep -i do-not-disturb) > /dev/null +mute_icon="" +unmute_icon="🕭" + +case $1 in + "show") + if [[ $disturbed == "" ]]; then + echo "$unmute_icon" + else + echo "$mute_icon" + fi + ;; + "change") + if [[ $disturbed == "" ]]; then + makoctl mode -a do-not-disturb > /dev/null + echo "$unmute_icon" + else + makoctl mode -r do-not-disturb > /dev/null + echo "$mute_icon" + fi + pkill -SIGRTMIN+2 waybar + ;; + *) + echo "Arguments are: show, change" + ;; +esac