daily pastebin goal
24%
SHARE
TWEET

Untitled

a guest Apr 20th, 2018 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. widget("gmail") {
  2.     set :interval => 5.minutes
  3.     set :username => "gigamo"
  4.     set :password => GMAIL_PWD
  5.  
  6.     property("text") {
  7.       # Make the widget blink upon new mail!
  8.       BLINK[@identifier] ||= []
  9.       if @count > 0
  10.         if BLINK[@identifier].empty?
  11.           BLINK[@identifier] << IO.popen("#{ENV["HOME"]}/bin/blink.rb 1.0 0 top #@identifier text urgent(' #@count') normal(' #@count')")
  12.         end
  13.       else
  14.         BLINK[@identifier].each do |blinker|
  15.           Process.kill("SIGINT", blinker.pid)
  16.         end
  17.       end
  18. #      # The actual string that's displayed
  19. #      if @count > 0 : urgent(" #@count")
  20. #      else normal(" #@count")
  21. #      end
  22.     }
  23.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top