1[calendars]
2# The *[calendars]* section is mandatory and must contain at least one subsection.
3# Every subsection must have a unique name (enclosed by two square brackets).
4# Each subsection needs exactly one *path* setting, everything else is optional.
5# Here is a small example:
6#
7# .. literalinclude:: ../../tests/configs/small.conf
8#  :language: ini
9[[__many__]]
10# The path to an existing directory where this calendar is saved as a *vdir*.
11# The directory is searched for events or birthdays (see ``type``). The path
12# also accepts glob expansion via `*` or `?` when type is set to discover.
13# This allows for paths such as `~/accounts/*/calendars/*`, where the
14# calendars directory contains vdir directories. In addition, `~/calendars/*`
15# and `~/calendars/default` are valid paths if there exists a vdir in the
16# `default` directory. (The previous behavior of recursively searching
17# directories has been replaced with globbing).
18path = expand_path(default=None)
19
20# khal will use this color for coloring this calendar's event.
21# The following color names are supported: *black*, *white*, *brown*, *yellow*,
22# *dark gray*, *dark green*, *dark blue*, *light gray*, *light green*, *light
23# blue*, *dark magenta*, *dark cyan*, *dark red*, *light magenta*, *light
24# cyan*, *light red*.
25# Depending on your terminal emulator's settings, they might look different
26# than what their name implies.
27# In addition to the 16 named colors an index from the 256-color palette or a
28# 24-bit color code can be used, if your terminal supports this.
29# The 256-color palette index is simply a number between 0 and 255.
30# The 24-bit color must be given as #RRGGBB, where RR, GG, BB is the
31# hexadecimal value of the red, green and blue component, respectively.
32# When using a 24-bit color, make sure to enclose the color value in ' or "!
33# If `color` is set to *auto* (the default), khal looks for a color value in a
34# *color* file in this calendar's vdir. If the *color* file does not exist, the
35# default_color (see below) is used. If color is set to '', the default_color is
36# always used. Note that you can use `vdirsyncer metasync` to synchronize colors
37# with your caldav server.
38
39color = color(default='auto')
40
41# When coloring days, the color will be determined based on the calendar with
42# the highest priority. If the priorities are equal, then the "multiple" color
43# will be used.
44
45priority = integer(default=10)
46
47# setting this to *True*, will keep khal from making any changes to this
48# calendar
49readonly = boolean(default=False)
50
51# Setting the type of this collection (default ``calendar``).
52#
53# If set to ``calendar`` (the default), this collection will be used as a
54# standard calendar, that is, only files with the ``.ics`` extension will be
55# considered, all other files are ignored (except for a possible `color` file).
56#
57# If set to ``birthdays`` khal will expect a VCARD collection and extract
58# birthdays from those VCARDS, that is only files with ``.vcf`` extension will
59# be considered, all other files will be ignored.  ``birthdays`` also implies
60# ``readonly=True``.
61#
62# If set to ``discover``, khal will use
63# `globbing <https://en.wikipedia.org/wiki/Glob_(programming)>`_ to expand this
64# calendar's `path` to (possibly) several paths and use those as individual
65# calendars (this cannot be used with `birthday` collections`). See `Exemplary
66# discover usage`_ for an example.
67#
68# If an individual calendar vdir has a `color` file, the calendar's color will
69# be set to the one specified in the `color` file, otherwise the color from the
70# *calendars* subsection will be used.
71type = option('calendar', 'birthdays', 'discover', default='calendar')
72
73[sqlite]
74# khal stores its internal caching database here, by default this will be in the *$XDG_DATA_HOME/khal/khal.db* (this will most likely be *~/.local/share/khal/khal.db*).
75path = expand_db_path(default=None)
76
77# It is mandatory to set (long)date-, time-, and datetimeformat options, all others options in the **[locale]** section are optional and have (sensible) defaults.
78[locale]
79
80# the first day of the week, where Monday is 0 and Sunday is 6
81firstweekday = integer(0, 6, default=0)
82
83# by default khal uses some unicode symbols (as in 'non-ascii') as indicators for things like repeating events,
84# if your font, encoding etc. does not support those symbols, set this to *False* (this will enable ascii based replacements).
85unicode_symbols = boolean(default=True)
86
87# this timezone will be used for new events (when no timezone is specified) and
88# when khal does not understand the timezone specified in the icalendar file.
89# If no timezone is set, the timezone your computer is set to will be used.
90default_timezone = timezone(default=None)
91
92# khal will show all times in this timezone
93# If no timezone is set, the timezone your computer is set to will be used.
94local_timezone = timezone(default=None)
95
96# khal will display and understand all times in this format.
97
98# The formatting string is interpreted as defined by Python's `strftime
99# <https://docs.python.org/3/library/time.html#time.strftime>`_, which is
100# similar to the format specified in ``man strftime``.
101
102# In the configuration file it may be necessary to enclose the format in
103# quotation marks to force it to be loaded as a string.
104timeformat = string(default='%X')
105
106# khal will display and understand all dates in this format, see :ref:`timeformat <locale-timeformat>` for the format
107dateformat = string(default='%x')
108
109# khal will display and understand all dates in this format, it should
110# contain a year (e.g. *%Y*) see :ref:`timeformat <locale-timeformat>` for the format.
111longdateformat = string(default='%x')
112
113# khal will display and understand all datetimes in this format, see
114# :ref:`timeformat <locale-timeformat>` for the format.
115datetimeformat = string(default='%c')
116
117# khal will display and understand all datetimes in this format, it should
118# contain a year (e.g. *%Y*) see :ref:`timeformat <locale-timeformat>` for the format.
119longdatetimeformat = string(default='%c')
120
121
122# Enable weeknumbers in `calendar` and `interactive` (ikhal) mode by specifying
123# whether they should be displayed on the 'left' or 'right'. These are iso
124# weeknumbers, so will only work properly if `firstweekday` is set to 0
125weeknumbers = weeknumbers(default='off')
126
127# Keybindings for :command:`ikhal` are set here. You can bind more than one key
128# (combination) to a command by supplying a comma-separated list of keys.
129# For binding key combinations concatenate them keys (with a space in
130# between), e.g. **ctrl n**.
131[keybindings]
132
133# move the cursor up (in the calendar browser)
134up = force_list(default=list('up', 'k'))
135
136# move the cursor down (in the calendar browser)
137down = force_list(default=list('down', 'j'))
138
139# move the cursor right (in the calendar browser)
140right = force_list(default=list('right', 'l', ' '))
141
142# move the cursor left (in the calendar browser)
143left = force_list(default=list('left', 'h', 'backspace'))
144
145# create a new event on the selected date
146new = force_list(default=list('n'))
147
148# delete the currently selected event
149delete = force_list(default=list('d'))
150
151# show details or edit (if details are already shown) the currently selected event
152view = force_list(default=list('enter'))
153
154# edit the currently selected events' raw .ics file with $EDITOR
155# Only use this, if you know what you are doing, the icalendar library we use
156# doesn't do a lot of validation, it silently disregards most invalid data.
157external_edit = force_list(default=list('meta E'))
158
159# focus the calendar browser on today
160today = force_list(default=list('t'))
161
162# save the currently edited event and leave the event editor
163save = force_list(default=list('meta enter'))
164
165# duplicate the currently selected event
166duplicate = force_list(default=list('p'))
167
168# export event as a .ics file
169export = force_list(default=list('e'))
170
171# go into highlight (visual) mode to choose a date range
172mark = force_list(default=list('v'))
173
174# in highlight mode go to the other end of the highlighted date range
175other = force_list(default=list('o'))
176
177# open a text field to start a search for events
178search = force_list(default=list('/'))
179
180# show logged messages
181log = force_list(default=list('L'))
182
183# quit
184quit = force_list(default=list('q', 'Q'))
185
186
187# Some default values and behaviors are set here.
188[default]
189
190# The calendar to use if none is specified for some operation (e.g. if adding a
191# new event). If this is not set, such operations require an explicit value.
192default_calendar = string(default=None)
193
194# By default, khal displays only dates with events in `list` or `calendar`
195# view.  Setting this to *True* will show all days, even when there is no event
196# scheduled on that day.
197show_all_days = boolean(default=False)
198
199# After adding a new event, what should be printed to standard out? The whole
200# event in text form, the path to where the event is now saved or nothing?
201print_new = option('event', 'path', 'False', default=False)
202
203# If true, khal will highlight days with events. Options for
204# highlighting are in [highlight_days] section.
205highlight_event_days = boolean(default=False)
206
207# Controls for how many days into the future we show events (for example, in
208# `khal list`) by default.
209timedelta = timedelta(default='2d')
210
211
212# Define the defaut duration for a day-long event ('khal new' only)
213default_event_duration = timedelta(default='1d')
214
215# Define the default duration for an event ('khal new' only)
216default_dayevent_duration = timedelta(default='1h')
217
218
219# The view section contains configuration options that effect the visual appearance
220# when using khal and ikhal.
221
222[view]
223
224# Defines the behaviour of ikhal's right column. If `True`, the right column
225# will show events for as many days as fit, moving the cursor through the list
226# will also select the appropriate day in the calendar column on the left. If
227# `False`, only a fixed ([default] timedelta) amount of days' events will be
228# shown, moving through events will not change the focus in the left column.
229dynamic_days = boolean(default=True)
230
231# weighting that is applied to the event view window
232event_view_weighting = integer(default=1)
233
234# Set to true to always show the event view window when looking at the event list
235event_view_always_visible = boolean(default=False)
236
237# Add a blank line before the name of the day (khal only)
238blank_line_before_day = boolean(default=False)
239
240# Choose a color theme for khal.
241#
242# This is very much work in progress. Help is really welcome! The two currently
243# available color schemes (*dark* and *light*) are defined in
244# *khal/ui/colors.py*, you can either help improve those or create a new one
245# (see below). As ikhal uses urwid, have a look at `urwid's documentation`__
246# for how to set colors and/or at the existing schemes. If you cannot change
247# the color of an element (or have any other problems) please open an issue on
248# github_.
249#
250# If you want to create your own color scheme, copy the structure of the
251# existing ones, give it a new and unique name and also add it as an option in
252# `khal/settings/khal.spec` in the section `[default]` of the property `theme`.
253#
254# __ http://urwid.org/manual/displayattributes.html
255# .. _github: # https://github.com/pimutils/khal/issues
256theme = option('dark', 'light', default='dark')
257
258# Whether to show a visible frame (with *box drawing* characters) around some
259# (groups of) elements or not. There are currently several different frame
260# options available, that should visually differentiate whether an element is
261# in focus or not. Some of them will probably be removed in future releases of
262# khal, so please try them out and give feedback on which style you prefer
263# (the color of all variants can be defined in the color themes).
264frame = option('False', 'width', 'color', 'top', default='False')
265
266# Whether to use bold text for light colors or not. Non-bold light colors may
267# not work on all terminals but allow using light background colors.
268bold_for_light_color = boolean(default=True)
269
270# Default formatting for events used when the user asks for all events in a
271# given time range, used for :command:`list`, :command:`calendar` and in
272# :command:`interactive` (ikhal). Please note, that any color styling will be
273# ignored in `ikhal`, where events will always be shown in the color of the
274# calendar they belong to.
275# The syntax is the same as for :option:`--format`.
276agenda_event_format = string(default='{calendar-color}{cancelled}{start-end-time-style} {title}{repeat-symbol}{alarm-symbol}{description-separator}{description}{reset}')
277
278# Specifies how each *day header* is formatted.
279agenda_day_format = string(default='{bold}{name}, {date-long}{reset}')
280
281# Display month name on row when the week contains the first day
282# of the month ('firstday') or when the first day of the week is in the
283# month ('firstfullweek')
284monthdisplay = monthdisplay(default='firstday')
285
286# Default formatting for events used when the start- and end-date are not
287# clear through context, e.g. for :command:`search`, used almost everywhere
288# but :command:`list` and :command:`calendar`. It is therefore probably a
289# sensible choice to include the start- and end-date.
290# The syntax is the same as for :option:`--format`.
291event_format = string(default='{calendar-color}{cancelled}{start}-{end} {title}{repeat-symbol}{alarm-symbol}{description-separator}{description}{reset}')
292
293# When highlight_event_days is enabled, this section specifies how
294# the highlighting/coloring of days is handled.
295[highlight_days]
296
297# Highlighting method to use -- foreground or background
298method = option('foreground', 'fg', 'background', 'bg', default='fg')
299
300# What color to use when highlighting -- explicit color or use calendar
301# color when set to ''
302color = color(default='')
303
304# How to color days with events from multiple calendars -- either
305# explicit color or use calendars' colors when set to ''
306multiple = color(default='')
307
308# Default color for calendars without color -- when set to '' it
309# actually disables highlighting for events that should use the
310# default color.
311default_color = color(default='')
312