1763127234

I use the org-pomodoro package for focused sessions at work. But Slack notifications can easily break my flow, so I added the simple hooks to disable visible notifications on GNOME desktop.

(defun arg-disable-gnome-notifications ()
  (shell-command "gsettings set org.gnome.desktop.notifications show-banners false"))
(defun arg-enable-gnome-notifications () (shell-command "gsettings set org.gnome.desktop.notifications show-banners true"))

(add-hook 'org-pomodoro-started-hook #'arg-disable-gnome-notifications)
(add-hook 'org-pomodoro-finished-hook #'arg-enable-gnome-notifications)
(add-hook 'org-pomodoro-break-finished-hook #'arg-enable-gnome-notifications)
(add-hook 'org-pomodoro-killed-hook #'arg-enable-gnome-notifications)