New message notifications and unread messages count from ProtonMail (Waybar/Polybar module)
Dependencies
- proton-client >= 0.7.1 (not available on pypi.org)
- ttf-font-awesome (default badge: )
- libnotify (new email notifications, can be disabled with
-dnflag) - libcanberra (optional, notification sound)
To display notifications you must have a notification daemon running on your system.
Install
ArchLinux and derivatives
Other distros
git clone https://github.com/crabvk/bar-protonmail.git
# WARN: Checkout to the latest tag, don't use master branch.
pip install -e .
And now you can execute ~/.local/bin/bar-protonmail
Use
First, you need to authenticate the client:
bar-protonmail auth
then just run bar-protonmail or bar-protonmail -f polybar.
Session, cache and log are stored in ~/.cache/bar-protonmail.
Waybar config example
~/.config/waybar/config
"modules-right": {
"custom/protonmail"
}
"custom/protonmail": {
"exec": "bar-protonmail",
"return-type": "json",
"interval": 10,
"tooltip": false,
"on-click": "xdg-open https://mail.proton.me/u/0/inbox"
}
~/.config/waybar/style.css
#custom-protonmail.unread {
color: white;
}
#custom-protonmail.inaccurate {
color: darkorange;
}
#custom-protonmail.error {
color: darkred;
}
Polybar config example
modules-right = protonmail
...
[module/protonmail]
type = custom/script
exec = bar-protonmail -f polybar
interval = 10
click-left = xdg-open https://mail.proton.me/u/0/inbox
Script arguments
See bar-protonmail -h for the list of arguments with descriptions.
Possible values for -s, --sound can be found with:
ls /usr/share/sounds/freedesktop/stereo/ | cut -d. -f1
for example -s message-new-instant.
Release files for bar-protonmail 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bar_protonmail-1.2.0.tar.gz | 8.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bar_protonmail-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.2 kB
Release files / bar_protonmail-1.2.0.tar.gz
| Download URL | bar_protonmail-1.2.0.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e9aff1193ca8486127a40392620f91f39b23617170b6e2754b15db316b3b2e5
|
|
BLAKE2b-256 checksum How to use checksums |
0f52b9b64b892baeeaf80495635ea47eb1aa2eee80e0f4787bec524a64ad9efa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.0 CPython/3.11.5 Linux/6.6.1-zen1-1-zen
|
Release files / bar_protonmail-1.2.0-py3-none-any.whl
| Download URL | bar_protonmail-1.2.0-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
85d75dfb0f144396354c8b8331aedc642ed67a6bbd27b6163da5a3cf1b2c8a09
|
|
BLAKE2b-256 checksum How to use checksums |
62856ec4a435e579ae01761ade45bbdc87ba425ad020ea2f3c6b2f182e2c15d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.0 CPython/3.11.5 Linux/6.6.1-zen1-1-zen
|