Skip to content

Instantly share code, notes, and snippets.

@ssov
Created March 6, 2012 10:46
Show Gist options
  • Save ssov/1985654 to your computer and use it in GitHub Desktop.
Save ssov/1985654 to your computer and use it in GitHub Desktop.
tmuxの右下のステータスバーにツイート表示するよ[えすけーぷした]
# -*- coding: utf-8 -*-
Plugin.create(:mikutter_tmux) do
on_update do |service, message|
message.each do |m|
begin
m.to_s.sub(/(.)/) { '\\' + $1 }
m.to_s.sub("#", "#")
system("tmux set status-right '#[fg=cyan][@" + m.idname + "] " + "#[fg=green]" + m.to_s[0,80] + "#[default]'")
rescue => ex
puts ex.message
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment