Skip to content

Instantly share code, notes, and snippets.

@milligramme
Forked from joker1007/separator.rb
Last active December 20, 2015 09:40
Show Gist options
  • Save milligramme/6109970 to your computer and use it in GitHub Desktop.
Save milligramme/6109970 to your computer and use it in GitHub Desktop.
Earthquake.init do
output do |item|
next unless item['text']
next unless config[:separator]
unless config[:screen_width]
begin
require 'curses'
screen = Curses.init_screen
config[:screen_width] = screen.maxx
Curses.close_screen
rescue LoadError
config[:screen_width] = 72
end
end
puts (config[:separator] * config[:screen_width]).c(:info)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment