Class: Wasko::Iterm
- Inherits:
-
Object
- Object
- Wasko::Iterm
- Defined in:
- lib/wasko/iterm.rb
Overview
Adds support for [iTerm2](code.google.com/p/iterm2/)
Class Method Summary collapse
- .method_missing(method_sym, *arguments, &block) ⇒ Object
-
.respond_to?(method_sym, include_private = false) ⇒ Boolean
Pretty big todo, shield this off somewhat.
- .set_bold_text_color(color) ⇒ Object
-
.set_normal_text_color(color) ⇒ Object
Terminal.app uses a slightly different terminology.
-
.startup_background_color ⇒ Object
iTerm doesn’t have a way to get back the original color, falling back to black for now.
Class Method Details
.method_missing(method_sym, *arguments, &block) ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/wasko/iterm.rb', line 22 def self.method_missing(method_sym, *arguments, &block) if method_sym.to_s =~ /^set_(.*)$/ self.set($1.gsub(/_/, " ") => arguments.first) elsif method_sym.to_s =~ /^([a-z]+_[a-z]+(.*))$/ self.get($1.gsub(/_/, " ")) else super end end |
.respond_to?(method_sym, include_private = false) ⇒ Boolean
Pretty big todo, shield this off somewhat.
33 34 35 36 37 38 39 40 41 |
# File 'lib/wasko/iterm.rb', line 33 def self.respond_to?(method_sym, include_private = false) if method_sym.to_s =~ /^set_(.*)$/ true elsif method_sym.to_s =~ /^[a-z]+_[a-z]+(.*)$/ true else super end end |
.set_bold_text_color(color) ⇒ Object
10 11 12 |
# File 'lib/wasko/iterm.rb', line 10 def self.set_bold_text_color(color) set_bold_color color end |
.set_normal_text_color(color) ⇒ Object
Terminal.app uses a slightly different terminology
6 7 8 |
# File 'lib/wasko/iterm.rb', line 6 def self.set_normal_text_color(color) set_foreground_color color end |
.startup_background_color ⇒ Object
iTerm doesn’t have a way to get back the original color, falling back to black for now.
Returns an applescript color
18 19 20 |
# File 'lib/wasko/iterm.rb', line 18 def self.startup_background_color "{0,0,0}" end |