Visual time blocks and more for the [[https://github.com/haji-ali/emacs-calfw][Emacs Calendar Framework (calfw)]].
The following features are implemented:
- Using calendar colours instead of a rotating list of colors for events.
- Using
cl-lib
functions.
- Viewing current time indicator only when today is being shown.
- Word wrapping text in events when possible.
- Removed separate rows for dates, including them instead in the day-header.
- Added a marker for the current day.
- Implemented continuous blocks for all-day events.
- Changed the grid rendering to use overlines.
- Cleaned up some of the code, though this is definitely WIP.
- Various fixes and linting (WIP).
- TODO: checkdoc
This fork must be installed with my fork of calfw
, otherwise it will not work.
- Screenshot
Weekly block view:
[[screenshot.png]]
Transposed two week view:
[[screenshot-transpose.png]]
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--day~ views always start on the current day, and ~transpose-two-weeks~ always starts on the most recent Sunday. The top right buttons labelled ~W^T~ and ~2W^T~ use ~transpose-8-day~ and ~transpose-14-day~, respectively.
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.
- License
GNU General Public License v3.0 (GPLv3)