Get notifications and unread messages count from Gmail (Waybar/Polybar module)
Project description
Bar Gmail
Get notifications and unread messages count from Gmail (Waybar/Polybar module).
Dependencies
pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib
# or use poetry
Font Awesome - default email icon
canberra-gtk-play - new email sound notification
You can change the icon or turn off sound, for more info see script arguments
Installation
cd ~/.config/polybar
curl -LO https://github.com/crabvk/polybar-gmail/archive/master.tar.gz
tar zxf master.tar.gz && rm master.tar.gz
mv polybar-gmail-master gmail
and obtain/refresh credentials
~/.config/polybar/gmail/auth.py
Module
[module/gmail]
type = custom/script
exec = ~/.config/polybar/gmail/launch.py
tail = true
click-left = xdg-open https://mail.google.com
Script arguments
-l
or --label
- set user's mailbox label, default: INBOX
-p
or --prefix
- set email icon, default:
-c
or --color
- set new email icon color, default: #e06c75
-ns
or --nosound
- turn off new email sound
-cr
or --credentials
- path to your credentials.json
, defaults to credentials.json
Example
./launch.py --label 'CATEGORY_PERSONAL' --prefix '✉' --color '#be5046' --nosound
Get list of all your mailbox labels
./list_labels.py
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file bar_gmail-1.0.0.tar.gz
.
File metadata
- Download URL: bar_gmail-1.0.0.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.5 Linux/6.5.3-zen1-1-zen
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23ab13e69620955f1c6f725aa4a2f3f659256f052adf65db9514f20f2842327a |
|
MD5 | cd95f562bf9754755c797831129c44cd |
|
BLAKE2b-256 | 9206d341ca4c03920c6bb0c1a9ce5730595f75f8b206981b4ed0ddac802deae0 |
File details
Details for the file bar_gmail-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: bar_gmail-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.5 Linux/6.5.3-zen1-1-zen
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9041e4e5143475351d628846d87d7d2b2677580bf7661887b151c98a2e156709 |
|
MD5 | 0c8893368d690e7666c72900bd836628 |
|
BLAKE2b-256 | 09df61d870af59824745ee426b4838440eac31df5eeba12f05d3a5d22b84e737 |