Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Gmail checker for Xmobar
# Gmail checker for Xmobar
# Install the ruby-gmail and mime gem to system
# Put the script under ~/path/to/gmail_checker.rb
# Make sure it is executable
require 'gmail'
gmail ='', 'password')
mail_count = gmail.inbox.count(:unread)
puts mail_count == 0 ? "No mail" : "Mail: #{mail_count}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.