Skip to content
Browse files

Change tmux status bar to status-left-bg

  • Loading branch information...
1 parent 06cd247 commit bd213c8b6e67b6825720e5f33382628b29779b78 Roy van de Water committed with Integrum User Sep 25, 2012
Showing with 7 additions and 7 deletions.
  1. +1 −1 Gemfile
  2. +1 −1 lib/guard/notifiers/tmux.rb
  3. +5 −5 spec/guard/notifiers/tmux_spec.rb
View
2 Gemfile
@@ -3,7 +3,7 @@ source :rubygems
gemspec
gem 'rake'
-gem 'listen', :github => 'guard/listen'
+gem 'listen', :git => 'http://github.com/guard/listen.git' #:github => 'guard/listen'
# The development group will no be
# installed on Travis CI.
View
2 lib/guard/notifiers/tmux.rb
@@ -45,7 +45,7 @@ def available?(silent = false)
#
def notify(type, title, message, image, options = { })
color = tmux_color type, options
- system("#{DEFAULTS[:client]} set-window-option -g window-status-current-bg #{color}")
+ system("#{DEFAULTS[:client]} set -g status-left-bg #{color}")
end
# Get the Tmux color for the notification type.
View
10 spec/guard/notifiers/tmux_spec.rb
@@ -44,31 +44,31 @@ def self.show(options) end
describe '.notify' do
it 'should set the tmux status bar color to green on success' do
- subject.should_receive(:system).with "tmux set-window-option -g window-status-current-bg green"
+ subject.should_receive(:system).with "tmux set -g status-left-bg green"
subject.notify('success', 'any title', 'any message', 'any image', { })
end
it 'should set the tmux status bar color to black on success when black is passed in as an option' do
- subject.should_receive(:system).with "tmux set-window-option -g window-status-current-bg black"
+ subject.should_receive(:system).with "tmux set -g status-left-bg black"
subject.notify('success', 'any title', 'any message', 'any image', { :success => 'black' })
end
it 'should set the tmux status bar color to red on failure' do
- subject.should_receive(:system).with "tmux set-window-option -g window-status-current-bg red"
+ subject.should_receive(:system).with "tmux set -g status-left-bg red"
subject.notify('failed', 'any title', 'any message', 'any image', { })
end
it 'should set the tmux status bar color to green on pending' do
- subject.should_receive(:system).with "tmux set-window-option -g window-status-current-bg green"
+ subject.should_receive(:system).with "tmux set -g status-left-bg green"
subject.notify('pending', 'any title', 'any message', 'any image', { })
end
it 'should set the tmux status bar color to green on notify' do
- subject.should_receive(:system).with "tmux set-window-option -g window-status-current-bg green"
+ subject.should_receive(:system).with "tmux set -g status-left-bg green"
subject.notify('notify', 'any title', 'any message', 'any image', { })
end

0 comments on commit bd213c8

Please sign in to comment.
Something went wrong with that request. Please try again.