Created
January 19, 2012 23:20
-
-
Save liangzan/1643664 to your computer and use it in GitHub Desktop.
Gmail checker for Xmobar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 = Gmail.new('[email protected]', '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