Sha256: d2cff95f3c3512e3747a8e20323decc756034d0eee3f9c3235eb703785dd770e
Contents?: true
Size: 696 Bytes
Versions: 1
Compression:
Stored size: 696 Bytes
Contents
#!/usr/bin/env ruby require 'rubygems' require "wx" class MinimalApp < Wx::App def initialize(time) @time = time super() end def on_init Wx::Timer.every(@time*60*1000) do @frame.set_background_colour Wx::GREEN end size = Wx::get_display_size size.set_height(size.get_height - 45) title = Time.now.strftime("%H:%M:%S") title += ' - ' title += (Time.now + @time*60).strftime("%H:%M:%S") title += ' (' title += @time.to_s title += ' minutes)' @frame = Wx::Frame.new(nil, -1, title, Wx::Point.new(0, 0), size) @frame.set_background_colour Wx::BLACK @frame.show end end MinimalApp.new((ARGV.first || 3).to_i).main_loop
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
black-screen-0.0.1 | bin/black_screen |