Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/unhammer/org-upcoming-modeline

📅 Show upcoming org event in modeline
https://github.com/unhammer/org-upcoming-modeline

calendar emacs events org-mode

Last synced: 3 months ago
JSON representation

📅 Show upcoming org event in modeline

Awesome Lists containing this project

README

        

#+TITLE: org-upcoming-modeline

[[https://melpa.org/#/org-upcoming-modeline][https://melpa.org/packages/org-upcoming-modeline-badge.svg]]
[[https://stable.melpa.org/#/org-upcoming-modeline][https://stable.melpa.org/packages/org-upcoming-modeline-badge.svg]]

This package shows you the next upcoming org appointment in your modeline.

You can left-click on it to go to it, right-click for a menu of
actions, middle-click to temporarily hide it.

#+ATTR_HTML: :alt org-upcoming-modeline demo
[[file:org-upcoming-modeline.gif][file:org-upcoming-modeline.gif]]

* Installation

** MELPA
If you use [[https://melpa.org/][MELPA]], you can do =M-x list-packages=, find
=org-upcoming-modeline= in the list and hit =i x=.

** Manual
Just put =org-upcoming-modeline.el= somewhere in =load-path=.

* Configuration
** Basic
#+begin_src emacs-lisp
(use-package org-upcoming-modeline
:after org ; if you don't want it to start until org has been loaded
:load-path "~/src/org-upcoming-modeline" ; if you installed manually
:config
(org-upcoming-modeline-mode))
#+end_src
** Advanced
You can generate a description of all the avaiable functionalites and display it from GNU Emacs by doing =M-x customize-group RET org-upcoming-modeline=.

Here is a non-exhaustive list of some =org-upcoming-modeline= functionalities:

- =org-upcoming-modeline-ignored-keywords= allows you to exclude TODO states.
Example excluding "BACKLOG" and "NEXT" states:
#+begin_src emacs-lisp
(setq org-upcoming-modeline-ignored-keywords '("BACKLOG" "NEXT")
#+end_src
- =org-upcoming-modeline-format= allows you to modify the displaying format of the elements around the appointment time (=time-string=) and the appointment title (=heading=).
Example replacing the alarm clock icon with a calendar icon, and replacing =:= with =-=:
#+begin_src emacs-lisp
(setq org-upcoming-modeline-format (lambda (ms mh) (format "🗓 %s - %s" ms mh)))
#+end_src
- =org-upcoming-modeline-days-ahead= allows you to fix the number of days to look into the future (1 by default).
Example looking for 15 days ahead:
#+begin_src emacs-lisp
(setq org-upcoming-modeline-days-ahead 15)
#+end_src
- =org-upcoming-modeline-trim= allows you to fix the number of characters displayed for the appointment title (=heading=), it is 20 by default.
Exemple removing the trimming:
#+begin_src emacs-lisp
(setq org-upcoming-modeline-trim nil)
#+end_src

* Related packages

** appt

=appt= is not itself integrated with org-mode, but if you do
=(add-hook 'org-finalize-agenda-hook #'org-agenda-to-appt)= it will
add appointments from that agenda to your list of future warnings, and
warn when you're getting closer. But the modeline just says "App't in
15 min." (it doesn't show the name of the event, and there's no
org-integration). However, by default it will keep popping up a small
window with the event name for you every so often when the event is
getting near.

In comparison, this package doesn't require you to open (the correct)
=org-agenda= first; it shows the actual org heading and adds
org-specific "actions" that you can select for the event. And since it
uses =org-ql=, it'll automatically remove the event (after a short
idle delay) if you remove it from your org file.