mirror of
https://github.com/szymon-jozef/amazing-dotfiles.git
synced 2026-09-07 20:20:43 +02:00
scripts
This commit is contained in:
28
scripts/check-do-not-disturb.sh
Executable file
28
scripts/check-do-not-disturb.sh
Executable file
@@ -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
|
||||
Reference in New Issue
Block a user