Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#!/bin/zsh
|
|
getargs() {
|
|
while getopts "se" opt
|
|
do
|
|
case $opt in
|
|
s) start="true";;
|
|
e) end="true";;
|
|
esac
|
|
done
|
|
}
|
|
start_dnd() {
|
|
echo "off" > ~/.cache/dunst
|
|
notify-send "DUNST_COMMAND_PAUSE";
|
|
}
|
|
end_dnd() {
|
|
echo "on" > ~/.cache/dunst
|
|
notify-send "DUNST_COMMAND_RESUME";
|
|
notify-send "Do Not Disturb" "Do Not Disturb mode ended. Notifications will be shown.";
|
|
}
|
|
main() {
|
|
getargs "$@";
|
|
[[ "$start" ]] && start_dnd;
|
|
[[ "$end" ]] && end_dnd;
|
|
kill -52 $(pidof dwmblocks)
|
|
}
|
|
main "$@"
|