diff options
author | Christian Geier <geier@lostpackets.de> | 2023-06-02 23:35:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-02 23:35:33 +0200 |
commit | f4db8ac849feed706e8920ff6f035acb35de01fb (patch) | |
tree | f3c3618d6156d0c0562e28d7ae1a32001e37b2cf | |
parent | 032f97c58da104672467781070800941ad49692b (diff) | |
parent | 9d8ba69bafd233957d5c1cf0393e6d5c5039c71f (diff) |
Merge pull request #1261 from r4ulill0/one-month-display
Implement minimum month display configuration
-rw-r--r-- | AUTHORS.txt | 1 | ||||
-rw-r--r-- | CHANGELOG.rst | 2 | ||||
-rw-r--r-- | khal/controllers.py | 3 | ||||
-rw-r--r-- | khal/settings/khal.spec | 4 |
4 files changed, 9 insertions, 1 deletions
diff --git a/AUTHORS.txt b/AUTHORS.txt index 44bdc67e..f95ca74b 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -50,3 +50,4 @@ Anuragh - kpanuragh [at] gmail [dot] com Henning Ullrich - github {at] henning-ullrich [dot] de Jason Cox - me [at] jasoncarloscox [dot] com - https://jasoncarloscox.com Michael Tretter - michael.tretter [at] posteo [dot] net +Raúl Medina - raulmgcontact [at] gmail (dot] com diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 48c1fb62..7b975827 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -14,6 +14,8 @@ not released yet * FIX khal `at` also uses `event_format` not `agenda_event_format` * FIX duplicating an event using `p` in ikhal +* NEW Add ability to change the minimum number of months displayed with + `min_calendar_display` 0.11.1 ====== diff --git a/khal/controllers.py b/khal/controllers.py index b1434e0f..64f43e6e 100644 --- a/khal/controllers.py +++ b/khal/controllers.py @@ -111,10 +111,11 @@ def calendar(collection, agenda_format=None, notstarted=False, once=False, dater ) if not event_column: event_column = [style('No events', bold=True)] + month_count = (end.year - start.year) * 12 + end.month - start.month + 1 calendar_column = calendar_display.vertical_month( month=start.month, year=start.year, - count=max(3, (end.year - start.year) * 12 + end.month - start.month + 1), + count=max(conf['view']['min_calendar_display'], month_count), firstweekday=firstweekday, weeknumber=weeknumber, monthdisplay=monthdisplay, collection=collection, diff --git a/khal/settings/khal.spec b/khal/settings/khal.spec index be60a07c..789b103a 100644 --- a/khal/settings/khal.spec +++ b/khal/settings/khal.spec @@ -291,6 +291,10 @@ monthdisplay = monthdisplay(default='firstday') # The syntax is the same as for :option:`--format`. event_format = string(default='{calendar-color}{cancelled}{start}-{end} {title}{repeat-symbol}{alarm-symbol}{description-separator}{description}{reset}') +# Minimum number of months displayed by calendar command +# default is 3 months +min_calendar_display = integer(default=3) + # When highlight_event_days is enabled, this section specifies how # the highlighting/coloring of days is handled. [highlight_days] |