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.

23 lines
424 B

4 years ago
  1. #!/bin/zsh
  2. getargs() {
  3. while getopts "se" opt
  4. do
  5. case $opt in
  6. s) start="true";;
  7. e) end="true";;
  8. esac
  9. done
  10. }
  11. start_dnd() {
  12. notify-send "DUNST_COMMAND_PAUSE";
  13. }
  14. end_dnd() {
  15. notify-send "DUNST_COMMAND_RESUME";
  16. notify-send "Do Not Disturb" "Do Not Disturb mode ended. Notifications will be shown.";
  17. }
  18. main() {
  19. getargs "$@";
  20. [[ "$start" ]] && start_dnd;
  21. [[ "$end" ]] && end_dnd;
  22. }
  23. main "$@"