Our org-agenda setup and trying something new
2023年3月25日土曜日 13:30 by [ - Anuma - ]Tags [ - Tech - Productivity - ]
org-super-agenda
, org-wild-notifier
and org-habit
to keep ourselves organized with Doom Emacs.
The setup
Part of the plan of this is try to change our habits for the better and stop being chronically online and depressed.
Installing the packages
First of all, we need to install the relevant org packages to our emacs, we will do this through the package!
macro doom emacs offers. There is a file specifically meant for this purpose in the doom configs, packages.el.
packages.el
(package! org-wild-notifier)
(package! org-super-agenda)
Org-wild-notifier
is a package that will send notifications to our notification server (in our case dunst). Meanwhile, org-super-agenda
will change the main view of the agenda, we mainly use this to group different tasks. We also need to tell emacs in the config.el file to require org-habit
.
config.el
(require 'org-habit)
The config
Our configuration is extremely basic, but for the purpose we use it, it works.
We define the org-wild-notifier
configuration with the use-package!
macro, it will make emacs initialize it when it launches, and asigns a style to send notifications, we recommend libnotify since it has always worked pretty well for us and is easy to use.
We will not use a keyword whitelist, and this is important because we want any scheduled task to be notified, we’ll also set a notification title and time (in minutes) for when it should be triggered. Multiple times can be specified, but we set only one, since we can add more in a per-task basis inside the org file where the task reside.
config.el
(use-package! org-wild-notifier
;;:ensure t
:custom
(alert-default-style 'libnotify)
(org-wild-notifier-keyword-whitelist nil)
(org-wild-notifier-notification-title "Agenda")
(org-wild-notifier-alert-time '(10))
:init
(org-wild-notifier-mode t))
Equally as above, we declare a org-super-agenda
setup with use-package!
, all the variables are pretty much self explaining in this snippet, but I’d like to draw attention to org-agenda-start-with-log-mode
and org-agenda-log-mode-items
. These variables will enable the agenda to display alread done tasks, this may be annoying to some people, but I think it’s important that one can see the progress they make along the day.
config.el
(use-package! org-super-agenda
:after org-agenda
:init
(setq org-agenda-skip-scheduled-if-done nil
org-agenda-skip-deadline-if-done t
org-agenda-include-deadlines t
org-agenda-block-separator nil
org-agenda-start-with-log-mode t
org-agenda-log-mode-items '(closed clock state)
;;org-agenda-compact-blocks t
org-agenda-start-day nil ;; i.e. today
org-agenda-span 7
org-agenda-start-on-weekday nil)
The most important variable to declare here, is org-super-agenda-groups
, here is the reason we use this pacakge in particular, we want to organize all our tags in groups because it makes the information more digestible for us. This is our personal setup, but there are a lot of settings for more fine control of the categories, you can see them in the official repo.
config.el
(setq org-super-agenda-groups
'(;; Each group has an implicit boolean OR operator between its selectors.
(:log t)
(:name "Today" ; Optionally specify section name
:time-grid t ; Items that appear on the time grid
:todo "TODAY") ; Items that have this TODO keyword
(:name "Dailies"
:and (:category "Self care" :todo "TODO")
:order 0)
(:name "Bimbofication"
:and (:category "Bimbofication" :todo "TODO")
:order 1)
(:name "日本語"
:and (:category "Japanese" :todo "TODO")
:order 3)
(:name "Class"
:category "Class"
:order 2)
))
:config
(org-super-agenda-mode))
Finally, we unbind the movement keys on the org-super-agenda
keymap, since they have more priority than the emacs evil-mode
, so by using the following snippet, we prevent them from conflicting.
config.el
(eval-after-load "org-super-agenda"
'(progn
(define-key org-super-agenda-header-map (kbd "j") nil)
(define-key org-super-agenda-header-map (kbd "k") nil)
(define-key org-super-agenda-header-map (kbd "h") nil)
(define-key org-super-agenda-header-map (kbd "l") nil)))
An example task in org mode
Be sure to remember to add the org file that has your tasks to the org-agenda, either through declared configuration or by using the C-c [
hotkey (by default in doom emacs).
This would be an example task in our org agenda file:
****<space>TODO HRT -- setting as todo
SCHEDULED: <2023-03-25 土 21:30 ++1d> -- scheduled date and time, after is done it's set to the next day after it was completed
:STYLE: habit -- will display the task habit, as a sort of "don't break the chain"
:WILD NOTIFIER NOTIFY BEFORE: 30 1 -- adds extra notifications half an hour and one minute before the scheduled time
The results
Trying something new
As you might have seen, we have a lot new tasks today, usually they were englobed in a generic self care rutine
task, which we failed to do very regularly, we often find ourselves at a struggle to take care of our body. So starting today we will be diving the tasks into easy, fast and small sub-tasks that hopefully will make us more willing to get things done, even if it’s not all of it, every little bit we manage to work on ourselves is a big win for us.