Guest User

Untitled

a guest
Feb 25th, 2013
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.43 KB | None | 0 0
  1. # Clock sublet file
  2. # wjeb to do ~/.local/share/subtle/sublets, nazwij clock.rb
  3. # i zrob w .local/share/subtle/icons gimpem plik clock.xbm, pusty 2x2px
  4. configure :clock do |s| # {{{
  5.   s.interval = s.config[:interval]      || 60
  6.   s.format   = s.config[:format_string] || "%y/%m/%d %H:%M"
  7.   s.icon     = Subtlext::Icon.new("clock.xbm")
  8. end # }}}
  9.  
  10. on :run do |s| # {{{
  11.   s.data = s.icon + Time.now().strftime(s.format)
  12. end # }}}
Advertisement
Add Comment
Please, Sign In to add comment