calfw-blocks
calfw-blocks copied to clipboard
Visual enhancements for the Emacs Calendar Framework (calfw)
- calfw-blocks.el
Visual time blocks and more for the [[https://github.com/kiwanami/emacs-calfw][Emacs Calendar Framework (calfw)]].
- Screenshot Weekly block view: [[screenshot.png]]
Transposed two week view: [[screenshot-transpose.png]]
- Installation ** Manual Installation Clone this git repo (e.g. to `~/.emacs.d/site-lisp/') #+begin_src cd ~/.emacs.d mkdir site-lisp cd site-lisp git clone https://github.com/ml729/calfw-blocks #+end_src
And add its path to `'load-path': #+begin_src emacs lisp (add-to-list 'load-path "~/.emacs.d/site-lisp/calfw-blocks") #+end_src
Make sure this package is loaded after calfw.
- Usage
This package comes with the following ~calfw~ views that display time blocks:
#+begin_src
'block-day
'block-week
'block-2-day
'block-3-day
'block-4-day
'block-5-day
#+end_src
The ~block-week~ view always starts on Sunday.
The ~block-day~ and ~block-
-day~ views always start on the current day. The top right button labelled ~Week~ uses ~block-week~.
The package also includes two-column transposed versions of the original calfw views (credit to @novoid for the [[https://github.com/kiwanami/emacs-calfw/issues/22][design]]), where days of the week are displayed vertically rather than horizontally:
#+begin_src
'transpose-8-day
'transpose-10-day
'transpose-12-day
'transpose-14-day
'transpose-two-weeks
#+end_src
The ~transpose-
You can use these to define functions that directly open calfw with these views. Examples: #+begin_src emacs lisp ;; Calendar showing org-agenda entries (defun my-open-calendar-agenda () (interactive) (cfw:open-calendar-buffer :contents-sources (list (cfw:org-create-source "medium purple")) :view 'block-week))
;; Calendar showing org entries from files (defun my-open-calendar-files () (interactive) (cfw:open-calendar-buffer :contents-sources (list (cfw:org-create-file-source "Todos" "~/stuff/todos.org" "green") (cfw:org-create-file-source "Events" "~/stuff/events.org" "blue")) :view 'block-3-day)) #+end_src
- Customization Notable customization options:
- ~calfw-blocks-earliest-visible-time~: what time of day the calendar starts at.
- ~calfw-blocks-show-time-grid~: shows a time grid if non-nil.
- ~calfw-blocks-default-event-length~: the length in hours of events with a start time but no end time; used to determine the size of the rendered block.
- ~calfw-blocks-lines-per-hour~: how many lines each hour gets.
- ~calfw-blocks-min-block-width~: the smallest width a block can be in characters (includes divider character). If there are too many concurrent events, some events are hidden so that all blocks are at least `calfw-blocks-min-block-width' characters wide.
-
Known Issues Does not currently handle multiday events with times on both the start and end dates, such as: #+begin_example SCHEDULED: <2023-07-06 Thu 19:00>--<2023-07-07 Fri 5:00> #+end_example
-
License GNU General Public License v3.0 (GPLv3)