Drop mako support
This commit is contained in:
parent
7b63f73414
commit
6f5c76b462
2 changed files with 19 additions and 22 deletions
|
@ -1,22 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
# Script to toggle Do not disturb mode for mako and dunst
|
||||
|
||||
# Permanent memory
|
||||
saved_state=0
|
||||
|
||||
# Toggle
|
||||
if [[ ${saved_state} -eq 0 ]] ; then
|
||||
~/.scripts/notify.sh 'Hiding notifications'
|
||||
sleep 5
|
||||
makoctl set-mode do-not-disturb
|
||||
dunstctl set-paused true
|
||||
else
|
||||
makoctl set-mode default
|
||||
dunstctl set-paused false
|
||||
~/.scripts/notify.sh 'Showing notifications'
|
||||
fi
|
||||
|
||||
# Update status in file
|
||||
new_state=$(( (${saved_state} + 1) % 2 ))
|
||||
sed -i "s/^saved_state=.*$/saved_state=${new_state}/" "${0}"
|
||||
|
19
scripts/do-not-disturb.sh
Executable file
19
scripts/do-not-disturb.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env bash
|
||||
# Script to toggle Do not disturb mode for dunst
|
||||
|
||||
# Get current state
|
||||
if [ "$( command -v dunstctl )" ]; then
|
||||
current_state="$( dunstctl is-paused )"
|
||||
fi
|
||||
|
||||
# Toggle
|
||||
if [ "${current_state}" == "false" ] ; then
|
||||
notify-send 'Hiding notifications'
|
||||
sleep 5
|
||||
# makoctl set-mode do-not-disturb
|
||||
dunstctl set-paused true
|
||||
else
|
||||
# makoctl set-mode default
|
||||
dunstctl set-paused false
|
||||
notify-send 'Showing notifications'
|
||||
fi
|
Loading…
Reference in a new issue