ultrabug / py3status

py3status is an extensible i3status wrapper written in python
https://ultrabug.github.io/py3status/
BSD 3-Clause "New" or "Revised" License
893 stars 261 forks source link

khal module #1740

Closed xenrox closed 5 years ago

xenrox commented 5 years ago

I am converting a few of my xmobar modules to py3status modules. One of them which could be useful for the public would be the calendar module for khal. It is similar to https://github.com/ultrabug/py3status/pull/961. At the moment its displays the time and title of the appointments of the current day. I plan to implement the colors (e.g. deprecated if the appointment is close ) and maybe a warning with notify-send when an appointment is close. What could be useful for the user to change in the settings:

  1. Timerange for displayed appointments
  2. Format (https://lostpackets.de/khal/usage.html; only title or with description)
  3. Timerange for warnings

Is there interest @lasers @cyrinux ?

lasers commented 5 years ago

Is there interest

If you have an use for it or you believe it will be cool/useful, then we're interested in khal too. Cheers.

cyrinux commented 5 years ago

Hi @xenrox, i'm very interested too! I use khal since few weeks ;). I will be able to test. 👍

xenrox commented 5 years ago

First simple version is ready: https://github.com/xenrox/py3status/commit/62229e70b44a4a31dff42c6e1316737bb853c430 What i could add:

  1. Colors for events (e.g. event is close: degraded, event started: bad, event normal: good)
  2. Notification for close events
lasers commented 5 years ago

@xenrox Can you make a PR? You should drop _py3 from your module name too. :woman_farmer:

xenrox commented 5 years ago

@lasers Ok i will open a PR later. Still have to change my formatter/linter to black.

I kinda have to give it a different name than simply khal.py because otherwise the name would hide the khal module from the package. Any idea how i should rename it?

lasers commented 5 years ago

Any idea how i should rename it?

Would khal_calendar work better? Similar to google_calendar.

Still have to change my formatter/linter to black.

black khal_py3.py will fix it for you in a second.

lasers commented 5 years ago

Closing in favor of continuing discussion in #1741.