pimutils / pimutils/khal

Exclude calendars from highlighting

Open
#1,424 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
3.1k
Forks
233
Avg merge
1h 44m
Merged PRs (30d)
1

Description

I’d like a calendar (containing employees’ vacations) to have a colour, for the list view, but not cause a day to be highlighted or switch to multiple on account of that calendar.

I suggest to use priority = -1 for this feature.

This could look like: (diff against the installed Debian trixie package)

--- calendar_display.py~	2025-08-12 16:44:54.712407531 +0200
+++ calendar_display.py	2025-08-12 16:50:15.464103934 +0200
@@ -70,8 +70,10 @@
             get_calendar_color(x, default_color, collection),
             collection._calendars[x]["priority"],
         )
-        for x in calendars
+        for x in calendars if collection._calendars[x]["priority"] > -1
     ]
+    if len(dcolors) < 1:
+        return ['']
 
     dcolors.sort(key=lambda x: x[1], reverse=True)
 

Mildly tested, so it’s not PR material, but perhaps make one of it.

(btw, hi geier ;)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in calendar_display.py, where calendar colors and priorities are assembled for display. Check how excluding calendars with priority -1 affects list-view colors, day highlighting, and switching to multiple calendars; done means such calendars retain a list-view color without affecting those other behaviors.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.