start new:
tmux
start new with session name:
tmux new -s myname
| #!/usr/bin/env python | |
| # saved to ~/bin/batcharge.py and from | |
| # http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/#my-right-prompt-battery-capacity | |
| #!/usr/bin/env python | |
| # coding=UTF-8 | |
| import math, subprocess | |
| p = subprocess.Popen(["ioreg", "-rc", "AppleSmartBattery"], stdout=subprocess.PIPE) | |
| output = p.communicate()[0] |
| (* | |
| Even though a [native solution][1] exists, it still suffers from a big flaw: it right-clicks the place you cursor is, not what you’re selecting. This addresses that limitation. | |
| You can install this as a [Finder Service, and later asign it a keyboard shortcut][2]. | |
| [1]: http://stackoverflow.com/questions/9171613/right-click-shortcut-for-mac-lion-os | |
| [2]: http://www.macosxautomation.com/services/learn/tut01/index.html | |
| *) |