Last active
August 29, 2015 14:02
-
-
Save nathanpc/86e2304f9bc0c607c5cd to your computer and use it in GitHub Desktop.
My .screenrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Autodetach session on hangup instead of terminating screen completely | |
autodetach on | |
# Set the colors to 256 and enable bold. | |
term screen-256color | |
attrcolor b ".I" | |
# 30.000-line scrollback buffer. | |
defscrollback 30000 | |
# Enable the xterm scrollbar. | |
termcapinfo xterm ti@:te@ | |
# Status bar. | |
backtick 1 5 5 battery-status | |
backtick 2 5 5 list-ips | |
hardstatus alwayslastline "%{b kw}%u%-Lw%{= rW}%50> %n%f %t %{-}%+Lw%< %= %{b kw}%2` | %1` | %{y}%D %M %d%{w}%{g}%C %A%{w}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep -E "state|percentage" | awk '{ if ($2 == "charging" || $2 == "fully-charged") printf "%s", "^"; else if ($2 == "discharging") printf ""; else printf "%s", $2; }' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ip addr | grep -E "inet[^6]192" | sed 's/\/[0-9][0-9]//' | awk '{ printf " %s: %s", $NF, $2 }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment