Module: ITT
- Defined in:
- lib/itt.rb,
lib/version.rb
Constant Summary collapse
- COLORS =
Predefined colors, as close to the default iTerm2 tab colors as possible
{ red: [214, 110, 107], green: [183, 213, 103], blue: [117, 165, 236], orange: [223, 157, 78], yellow: [167, 160, 96], purple: [140, 121, 149] }
- HELP =
Help info
''
- VERSION =
'0.1.7'
Instance Method Summary collapse
-
#clear_color ⇒ Object
Escape sequences to clear the title and color.
- #clear_title ⇒ Object
-
#set_color(red, green, blue) ⇒ Object
Escape sequences to set the color.
-
#set_title(title) ⇒ Object
Escape sequence to set the title.
Instance Method Details
#clear_color ⇒ Object
Escape sequences to clear the title and color
41 42 43 |
# File 'lib/itt.rb', line 41 def clear_color "\e]6;1;bg;*;default\a" end |
#clear_title ⇒ Object
45 46 47 |
# File 'lib/itt.rb', line 45 def clear_title "\e]1;\a" end |
#set_color(red, green, blue) ⇒ Object
Escape sequences to set the color
33 34 35 36 37 38 |
# File 'lib/itt.rb', line 33 def set_color(red, green, blue) output = '' output << "\e]6;1;bg;red;brightness;#{red}\a" output << "\e]6;1;bg;green;brightness;#{green}\a" output << "\e]6;1;bg;blue;brightness;#{blue}\a" end |
#set_title(title) ⇒ Object
Escape sequence to set the title
28 29 30 |
# File 'lib/itt.rb', line 28 def set_title(title) "\e];#{Rumoji.decode(title)}\007" end |