Skip to content

Instantly share code, notes, and snippets.

@nathanpc
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nathanpc/86e2304f9bc0c607c5cd to your computer and use it in GitHub Desktop.
Save nathanpc/86e2304f9bc0c607c5cd to your computer and use it in GitHub Desktop.
My .screenrc
# 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}"
#!/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; }'
#!/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