aboutsummaryrefslogtreecommitdiff
path: root/.emacs.d/rul-lisp/packages
diff options
context:
space:
mode:
authorRaul Benencia <raul@thousandeyes.com>2024-11-20 14:30:09 -0800
committerRaul Benencia <raul@thousandeyes.com>2024-11-20 14:30:09 -0800
commitc67ea65e46adb6b3c8c54dcee48b9966c062b63f (patch)
treec38a8e36be3df7bef58faba61e12963220ce534b /.emacs.d/rul-lisp/packages
parentb25cc68585731c6e8295cfcd927518a4e0fa9682 (diff)
emacs: integrate org-pomodoro with gnome notificationsHEADmaster
Diffstat (limited to '.emacs.d/rul-lisp/packages')
-rw-r--r--.emacs.d/rul-lisp/packages/rul-org.el17
1 files changed, 16 insertions, 1 deletions
diff --git a/.emacs.d/rul-lisp/packages/rul-org.el b/.emacs.d/rul-lisp/packages/rul-org.el
index b5eae02..fc13653 100644
--- a/.emacs.d/rul-lisp/packages/rul-org.el
+++ b/.emacs.d/rul-lisp/packages/rul-org.el
@@ -13,7 +13,22 @@
(setq org-edit-src-content-indentation 0)
(use-package org-modern :ensure t)
-(use-package org-pomodoro :ensure t)
+
+(use-package org-pomodoro
+ :ensure t
+ :config
+ (defun rul/disable-notifications ()
+ "Disable GNOME notifications."
+ (shell-command "gsettings set org.gnome.desktop.notifications show-banners false"))
+
+ (defun rul/enable-notifications ()
+ "Enable GNOME notifications."
+ (shell-command "gsettings set org.gnome.desktop.notifications show-banners true"))
+
+ ;; Add hooks for Pomodoro start and finish
+ (add-hook 'org-pomodoro-started-hook #'rul/disable-notifications)
+ (add-hook 'org-pomodoro-finished-hook #'rul/enable-notifications)
+ (add-hook 'org-pomodoro-killed-hook #'rul/enable-notifications))
;; (add-hook 'org-mode-hook 'turn-off-auto-fill)
;; (add-hook 'auto-save-hook 'org-save-all-org-buffers)
nihil fit ex nihilo