Skip to content

Instantly share code, notes, and snippets.

@AndrewVos AndrewVos/.tmux.conf
Last active Mar 17, 2017

Embed
What would you like to do?
Tmux status that draws a rabbit if your cpu is not in heavy use, or a turtle if it is
set status-right "#(cpu.rb)"
set status-interval 5
#!/usr/bin/env ruby
# encoding: UTF-8
usage = `echo $(top -l 1 | grep "CPU usage:")`
idle = Float(usage.scan(/(\d+\.\d+)\% idle/)[0][0])
if idle < 20
print " 🐢 "
else
print " 🐇 "
end
@AndrewVos

This comment has been minimized.

Copy link
Owner Author

AndrewVos commented Jul 31, 2013

rabbit

turtle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.