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
bar_gmail-1.0.0.tar.gz
(6.6 kB
view hashes)
Built Distribution
Close
Hashes for bar_gmail-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9041e4e5143475351d628846d87d7d2b2677580bf7661887b151c98a2e156709 |
|
MD5 | 0c8893368d690e7666c72900bd836628 |
|
BLAKE2b-256 | 09df61d870af59824745ee426b4838440eac31df5eeba12f05d3a5d22b84e737 |