pimutils / pimutils/khal

Allow configuring a `picker_cmd` for picking a collection

Open
#1,396 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Problem

When I run khal import, khal renders a list of all calendars in a long wrapped line with a number after each one. Visually scanning through over a dozen calendars to find the right one isn't very comfortable.

Tentative solution

I would prefer to use fzf to pick a calendar (e.g.: execute an external command for picking). I suppose others may want to write their own picker, but I suspect that fzf is good enough for all cases.

In order to use fzf (or any other picker), we need a picker_cmd configuration option. khal writes all calendar displaynames to this program's stdin, the program prints back the selected calendar (or exits non-zero if non was selected).

As an end result, when importing, I'd just type per to fuzzy-match the calendar personal, without having to scan through several calendars in order to figure out that personal is 8.

Not entirely sure what to do by default. Keep the current picker?

Additional notes

When importing events, the calendar selection UI should hide calendars with are meant to contain todos (and not events). A vdir currently does not encode this information, but it is planned for future.

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 with the khal import command and its current calendar-selection UI, then trace how configuration options are read and how calendar display names are presented. The work is done when an optional external picker can select a calendar through stdin/stdout while preserving the default picker and excluding todo-only calendars from event imports.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.