Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## earthquake.gem to tmux status-right
- ## use :tmux command to set on/off
- Earthquake.init do
- once do
- @tmux_status = false
- end
- command :tmux do
- @tmux_status = (@tmux_status)? false : true
- puts "send to tmux-status-right: #{@tmux_status}"
- end
- output do |item|
- if !ENV["TMUX"].nil? and @tmux_status
- next unless item["text"]
- system "tmux set -g status-right '#{item["user"]["screen_name"]}: #{item["text"].truncate(80,:omission => "...")}' > /dev/null"
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment