Skip to main content

ICAL Status - Status bar for ICS Calenders

Changelog

0.1.0

  • Require python 3.12+
  • Upgrade dependencies
  • Fix bug in timezone handling

0.0.6

  • Require python 3.11+ and upgrade dependencies

Installation

pip install icalstatus

Status

To run, one of:

  • icalstatus
  • icalwaybar
  • icalexecutor

Configuration

For the status you must configure exactly one calendar source, either on the command line or in the configuration file ~/.config/icalstatus/config.

For an ICS URL:

E.g, for OWA:

[DEFAULT]
calendar-url=https://(HOST)/owa/calendar/(...)/calendar.ics

For an on-premises Exchange server using EWS:

[DEFAULT]
exchange-server=mail.example.com
exchange-user=DOMAIN\user
exchange-mailbox=user@example.com
exchange-password-path=work/exchange/user
location-strip-regex=^OSL\s*|\s*\(\d+\)$

exchange-server is a hostname. exchange-user is the authentication username and may use the DOMAIN\username form expected by an on-premises server. exchange-mailbox is the mailbox's primary SMTP address. Authentication is detected by exchangelib. Calendar entries are fetched for the next seven days. When Exchange provides a calendar location, it is shown after the meeting subject in the form Subject [Room]. The OWA/ICS source behavior is unchanged. Use location-strip-regex to remove Exchange-specific prefixes or suffixes before the location is displayed. For example, OSL Angler-802A (4) becomes Angler-802A with the example above.

The Exchange password is not stored in the configuration. Store it in gopass and configure only its secret path. The equivalent lookup performed by icalstatus is:

gopass show --password work/exchange/user

The gopass executable and an initialized, unlockable password store must be available in the environment where icalstatus runs.

All options can be specified in the same configuration file and the other available options are:

usage: ICAL Status [-h] [--calendar-url CALENDAR_URL] [--timezone TIMEZONE] [--no-verify] [--proxy PROXY] [--all] [--humanize-after HUMANIZE_AFTER]
                   [--alert-sec-before ALERT_SEC_BEFORE]

options:
  -h, --help            show this help message and exit
  --calendar-url CALENDAR_URL
                        URI for ICS Calendar
  --exchange-server EXCHANGE_SERVER
                        Exchange server hostname
  --exchange-user EXCHANGE_USER
                        Exchange authentication username
  --exchange-mailbox EXCHANGE_MAILBOX
                        Primary SMTP address of the Exchange mailbox
  --exchange-password-path EXCHANGE_PASSWORD_PATH
                        gopass path containing the Exchange password
  --location-strip-regex LOCATION_STRIP_REGEX
                        Regex used to remove parts of Exchange meeting locations
  --timezone TIMEZONE   Timezone (default=CET)
  --no-verify           Ignore SSL verification errors
  --proxy PROXY         Proxy for ICS url
  --all                 Include events that are not today
  --humanize-after-sec HUMANIZE_AFTER
                        Humanize meeting date if less than this many seconds
                        until meeting
  --alert-sec-before ALERT_SEC_BEFORE
                        Alert meeting at specified seconds before start.
                        This will switch class for output on waybar.

Options:

all

By default, only todays events will be shown (and output will be empty if no more event the same day). Specify --all to show all events.

humanize-after-sec

Meeting time will be show in "human format" if it less than this many seconds until the meeting. E.g. if the time is 11:30 and you have specified --humanize-after-sec 3600 the output will be

<Meeting> in 30 minutes

If you at 11:30 specified --humanize-after it will show

<Meeting> @12:00

alert-sec-before

This option is only relevant for icalwaybar. If is is less than this many seconds to the meeting, it will use class: alert, otherwize class: normal. Examples (when running the command at 11:50):

icalwaybar --alert-sec-before 900
{"text": "<Meeting> in 10 minutes", "class": "alert"}
icalwaybar --alert-sec-before 300
{"text": "<Meeting> in 10 minutes", "class": "normal"}

Output specific formatting

icalexecutor

If the meeting is within --alert-sec-before, <executor.css.red> will be added to the output.

This means that you can specify the CSS class red according to https://raujonas.github.io/executor/docs/configuration/custom-css/:

.red {
    color: red;
}

.e.g in ~/.config/executor@raujonas.github.io/custom.css.

Parse

A tool to parse ics files and output summary to stdout is included:

  • icalparse

Credits

Original code/idea from Geir Skjøtskift (https://github.com/geirskjo).

Metadata

Release files for icalstatus 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for icalstatus 0.3.1
File Interpreter ABI Platform
icalstatus-0.3.1-py3-none-any.whl Python 3 none any Details

Release files / icalstatus-0.3.1-py3-none-any.whl

Download URL icalstatus-0.3.1-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
15e4e9cac3e69fb0d0ee8ab6aca168cd97ddf460cbf41ab093f1e6a3e4fd7b27
BLAKE2b-256 checksum
How to use checksums
fb1e1d71c2efc8e61c09becc2acc69ad8dc1dfc256818d9c3ce3771d801c9271
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.3.1 This release

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.0

1 release file

0.0.11

1 release file

0.0.10

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page