Guest User

Untitled

a guest
May 16th, 2018
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  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. }
Add Comment
Please, Sign In to add comment