Skip to content

Visual enhancements for the Emacs Calendar Framework (calfw)

Notifications You must be signed in to change notification settings

vedang/calfw-blocks

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 

Repository files navigation

calfw-blocks.el

Visual time blocks for the Emacs Calendar Framework (calfw).

Screenshot

screenshot.png

Installation

Manual Installation

Clone this git repo (e.g. to `~/.emacs.d/site-lisp/’)

cd ~/.emacs.d
mkdir site-lisp
cd site-lisp
git clone https://github.com/ml729/calfw-blocks

And add its path to `’load-path’:

(add-to-list 'load-path "~/.emacs.d/site-lisp/calfw-blocks")

Make sure this package is loaded after calfw.

Usage

This package comes with the following new calfw views:

'block-day
'block-week
'block-2-day
'block-3-day
'block-4-day
'block-5-day

The block-week view always starts on Sunday. The block-day and block-<n>-day views always start on the current day.

You can use these to define functions that directly open calfw with these views. Examples:

;; 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))

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)

About

Visual enhancements for the Emacs Calendar Framework (calfw)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Emacs Lisp 100.0%