Skip to main content

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).

preview

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)

Uploaded Source

Built Distribution

bar_gmail-1.0.0-py3-none-any.whl (8.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page