Class: Mysqlknife::Iterm
- Inherits:
-
Object
- Object
- Mysqlknife::Iterm
- Defined in:
- lib/mysqlknife/iterm.rb
Constant Summary collapse
- @@colors =
{ orange: [255,128,000], green: [000,255,000], red: [255,000,000] }
Instance Method Summary collapse
Instance Method Details
#color(name) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/mysqlknife/iterm.rb', line 13 def color(name) name = name.to_sym red = @@colors[name][0] green = @@colors[name][1] blue = @@colors[name][2] print "\033]6;1;bg;red;brightness;#{red}\a" print "\033]6;1;bg;green;brightness;#{green}\a" print "\033]6;1;bg;blue;brightness;#{blue}\a" end |
#name(name = nil) ⇒ Object
9 10 11 |
# File 'lib/mysqlknife/iterm.rb', line 9 def name(name = nil) print "\033]0;#{name}\007" end |
#reset ⇒ Object
25 26 27 |
# File 'lib/mysqlknife/iterm.rb', line 25 def reset print "\033]6;1;bg;*;default\a" end |