From 28a80bef99c7c3ca2d4f59bff571cdd8f6c2de7e Mon Sep 17 00:00:00 2001 From: Emmet Date: Sat, 23 Sep 2023 11:54:14 -0500 Subject: [PATCH] Org agenda improvements! --- user/app/doom-emacs/config.el | 71 +++++++++++++++---------- user/app/doom-emacs/doom.nix | 8 ++- user/app/doom-emacs/doom.org | 91 ++++++++++++++++++++++----------- user/app/doom-emacs/packages.el | 1 + 4 files changed, 113 insertions(+), 58 deletions(-) diff --git a/user/app/doom-emacs/config.el b/user/app/doom-emacs/config.el index 3ee49b0..d827cc2 100644 --- a/user/app/doom-emacs/config.el +++ b/user/app/doom-emacs/config.el @@ -818,7 +818,16 @@ tasks." org-agenda-skip-scheduled-if-deadline-is-shown t org-agenda-skip-timestamp-if-deadline-is-shown t) -;; Toggle comopleted entries function +;; Custom styles for dates in agenda +(custom-set-faces! + '(org-agenda-date :inherit outline-1 :height 1.15) + '(org-agenda-date-today :inherit diary :height 1.15) + '(org-agenda-date-weekend :ineherit outline-2 :height 1.15) + '(org-agenda-date-weekend-today :inherit outline-4 :height 1.15) + ) + + +;; Toggle completed entries function (defun org-agenda-toggle-completed () (interactive) (setq org-agenda-skip-timestamp-if-done (not org-agenda-skip-timestamp-if-done) @@ -909,47 +918,48 @@ tasks." (setq org-super-agenda-groups '(;; Each group has an implicit boolean OR operator between its selectors. - (:name "Home Tech" - :and(:file-path "emmet/Agenda" :not (:tag "event")) + (:name "Personal" + :and(:file-path "Personal.p" :not (:tag "event")) :order 3) (:name "Family" - :and(:file-path "Family" :not (:tag "event")) + :and(:file-path "Family.s" :not (:tag "event")) :order 3) - (:name "Teaching Prep" - :and(:file-path "Teaching.p" :tag "planning" :not (:tag "grading") :not (:tag "event")) + (:name "Teaching" + :and(:file-path "Teaching.p" :not (:tag "event")) :order 3) - (:name "Teaching Secretarial" - :and(:file-path "Teaching.p" :tag "secretarial" :not (:tag "grading") :not (:tag "event")) + (:name "Gamedev" + :and(:file-path "Gamedev.s" :not (:tag "event")) :order 3) - (:name "Teaching Grading" - :and(:file-path "Teaching.p" :tag "grading" :not (:tag "planning") :not (:tag "event")) - :order 3) - - (:name "School Side Projects" - :and(:file-path "Teaching.p" :tag "project" :not (:tag "planning") :not (:tag "event")) - :order 3) - - (:name "Gamedev Current Projects" - :and (:file-path "Gamedev" :todo "STRT") - :order 5) - (:name "Youtube" - :tag "youtube" - :order 6) + :and(:file-path "Producer.p" :not (:tag "event")) + :order 3) + + (:name "Music" + :and(:file-path "Bard.p" :not (:tag "event")) + :order 3) + + (:name "Storywriting" + :and(:file-path "Stories.s" :not (:tag "event")) + :order 3) + + (:name "Writing" + :and(:file-path "Author.p" :not (:tag "event")) + :order 3) (:name "Learning" - :tag "learning" - :order 7) + :and(:file-path "Knowledge.p" :not (:tag "event")) + :order 3) - (:name "Today" ; Optionally specify section name + (:name " Today" ; Optionally specify section name :time-grid t :date today :scheduled today - :order 1) + :order 1 + :face 'warning) )) (org-super-agenda-mode t) @@ -962,6 +972,15 @@ tasks." :map org-super-agenda-header-map "k" 'org-agenda-previous-line) +(add-load-path! "~/.emacs.d/org-yaap") +(require 'org-yaap) +(setq org-yaap-alert-title "Org Agenda") +(setq org-yaap-overdue-alerts 20) +(setq org-yaap-alert-before 20) +(setq org-yaap-daily-alert '(7 30)) +(setq org-yaap-daemon-idle-time 30) +(org-yaap-mode 1) + ;;;------ magit configuration ------;;; ;; Need the following two blocks to make magit work with git bare repos diff --git a/user/app/doom-emacs/doom.nix b/user/app/doom-emacs/doom.nix index 50df518..a3df0ec 100644 --- a/user/app/doom-emacs/doom.nix +++ b/user/app/doom-emacs/doom.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, eaf, eaf-browser, org-nursery, phscroll, theme, font, name, username, email, dotfilesDir, profile, wmType, defaultRoamDir, ... }: +{ config, lib, pkgs, eaf, eaf-browser, org-nursery, phscroll, org-yaap, theme, font, name, username, email, dotfilesDir, profile, wmType, defaultRoamDir, ... }: let themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + "../../../../themes"+("/"+theme)+"/polarity.txt")); dashboardLogo = ./. + "/nix-" + themePolarity + ".png"; @@ -69,6 +69,12 @@ in source = "${eaf}"; recursive = true; }; + + home.file.".emacs.d/org-yaap" = { + source = "${org-yaap}"; + recursive = true; + }; + home.file.".emacs.d/eaf/app/browser" = { source = "${eaf-browser}"; recursive = true; diff --git a/user/app/doom-emacs/doom.org b/user/app/doom-emacs/doom.org index 5620a2d..a8eeb5d 100644 --- a/user/app/doom-emacs/doom.org +++ b/user/app/doom-emacs/doom.org @@ -957,8 +957,7 @@ On Wayland, EAF doesn't work. #+END_SRC ** Org Agenda Configuration -*** TODO Standard Org Agenda Configuration -I need to automate categories being added to org roam agenda files. +*** Standard Org Agenda Configuration #+BEGIN_SRC emacs-lisp :tangle config.el ;;;------ Org agenda configuration ------;;; @@ -971,7 +970,16 @@ I need to automate categories being added to org roam agenda files. org-agenda-skip-scheduled-if-deadline-is-shown t org-agenda-skip-timestamp-if-deadline-is-shown t) -;; Toggle comopleted entries function +;; Custom styles for dates in agenda +(custom-set-faces! + '(org-agenda-date :inherit outline-1 :height 1.15) + '(org-agenda-date-today :inherit diary :height 1.15) + '(org-agenda-date-weekend :ineherit outline-2 :height 1.15) + '(org-agenda-date-weekend-today :inherit outline-4 :height 1.15) + ) + + +;; Toggle completed entries function (defun org-agenda-toggle-completed () (interactive) (setq org-agenda-skip-timestamp-if-done (not org-agenda-skip-timestamp-if-done) @@ -1062,54 +1070,54 @@ I need to automate categories being added to org roam agenda files. :nvmeg "" #'org-agenda-switch-with-roam) #+END_SRC -*** TODO Org Super Agenda Configuration -I need to fix =org-super-agenda-groups= to be more useful and less spread out. +*** Org Super Agenda Configuration #+BEGIN_SRC emacs-lisp :tangle config.el (require 'org-super-agenda) (setq org-super-agenda-groups '(;; Each group has an implicit boolean OR operator between its selectors. - (:name "Home Tech" - :and(:file-path "emmet/Agenda" :not (:tag "event")) + (:name "Personal" + :and(:file-path "Personal.p" :not (:tag "event")) :order 3) (:name "Family" - :and(:file-path "Family" :not (:tag "event")) + :and(:file-path "Family.s" :not (:tag "event")) :order 3) - (:name "Teaching Prep" - :and(:file-path "Teaching.p" :tag "planning" :not (:tag "grading") :not (:tag "event")) + (:name "Teaching" + :and(:file-path "Teaching.p" :not (:tag "event")) :order 3) - (:name "Teaching Secretarial" - :and(:file-path "Teaching.p" :tag "secretarial" :not (:tag "grading") :not (:tag "event")) + (:name "Gamedev" + :and(:file-path "Gamedev.s" :not (:tag "event")) :order 3) - (:name "Teaching Grading" - :and(:file-path "Teaching.p" :tag "grading" :not (:tag "planning") :not (:tag "event")) - :order 3) - - (:name "School Side Projects" - :and(:file-path "Teaching.p" :tag "project" :not (:tag "planning") :not (:tag "event")) - :order 3) - - (:name "Gamedev Current Projects" - :and (:file-path "Gamedev" :todo "STRT") - :order 5) - (:name "Youtube" - :tag "youtube" - :order 6) + :and(:file-path "Producer.p" :not (:tag "event")) + :order 3) + + (:name "Music" + :and(:file-path "Bard.p" :not (:tag "event")) + :order 3) + + (:name "Storywriting" + :and(:file-path "Stories.s" :not (:tag "event")) + :order 3) + + (:name "Writing" + :and(:file-path "Author.p" :not (:tag "event")) + :order 3) (:name "Learning" - :tag "learning" - :order 7) + :and(:file-path "Knowledge.p" :not (:tag "event")) + :order 3) - (:name "Today" ; Optionally specify section name + (:name " Today" ; Optionally specify section name :time-grid t :date today :scheduled today - :order 1) + :order 1 + :face 'warning) )) (org-super-agenda-mode t) @@ -1123,6 +1131,20 @@ I need to fix =org-super-agenda-groups= to be more useful and less spread out. "k" 'org-agenda-previous-line) #+END_SRC + +#+RESULTS: + +*** Org Agenda Notifications +#+BEGIN_SRC emacs-lisp :tangle config.el +(add-load-path! "~/.emacs.d/org-yaap") +(require 'org-yaap) +(setq org-yaap-alert-title "Org Agenda") +(setq org-yaap-overdue-alerts 20) +(setq org-yaap-alert-before 20) +(setq org-yaap-daily-alert '(7 30)) +(setq org-yaap-daemon-idle-time 30) +(org-yaap-mode 1) +#+END_SRC ** Magit Configuration #+BEGIN_SRC emacs-lisp :tangle config.el ;;;------ magit configuration ------;;; @@ -1630,11 +1652,12 @@ Any git package can be configured for a particular commit or branch: (package! focus) (package! olivetti) (package! async) +(package! centered-cursor-mode) #+END_SRC * Nix Integration In order to have Nix load my Doom Emacs configuration [[./doom.nix][doom.nix]], which I source in the =imports= block of my [[../../../profiles/work/home.nix][home.nix]]. #+BEGIN_SRC nix :tangle doom.nix -{ config, lib, pkgs, eaf, eaf-browser, org-nursery, phscroll, theme, font, name, username, email, dotfilesDir, profile, wmType, defaultRoamDir, ... }: +{ config, lib, pkgs, eaf, eaf-browser, org-nursery, phscroll, org-yaap, theme, font, name, username, email, dotfilesDir, profile, wmType, defaultRoamDir, ... }: let themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + "../../../../themes"+("/"+theme)+"/polarity.txt")); dashboardLogo = ./. + "/nix-" + themePolarity + ".png"; @@ -1705,6 +1728,12 @@ in source = "${eaf}"; recursive = true; }; + + home.file.".emacs.d/org-yaap" = { + source = "${org-yaap}"; + recursive = true; + }; + home.file.".emacs.d/eaf/app/browser" = { source = "${eaf-browser}"; recursive = true; diff --git a/user/app/doom-emacs/packages.el b/user/app/doom-emacs/packages.el index ca15ef5..1c2af42 100644 --- a/user/app/doom-emacs/packages.el +++ b/user/app/doom-emacs/packages.el @@ -21,3 +21,4 @@ (package! focus) (package! olivetti) (package! async) +(package! centered-cursor-mode)