Skip to content

Instantly share code, notes, and snippets.

@jiananlu
Forked from misscache/.screenrc
Created March 13, 2014 06:55
Show Gist options
  • Save jiananlu/9523049 to your computer and use it in GitHub Desktop.
Save jiananlu/9523049 to your computer and use it in GitHub Desktop.

#Enhance my screen

.screenrc

# Here comes the pain...
 caption always "%{=b dw}:%{-b dw}:%{=b dk}[ %{-b dw}%{-b dg}$USER%{-b dw}@%{-b dg}%H %{=b dk}] [ %= %?%{-b dg}%-Lw%?%{+b dk}(%{+b dw}%n:%t%{+b dk})%?(%u)%?%{-b dw}%?%{-b dg}%+Lw%? %{=b dk}]%{-b dw}:%{+b dw}:"

 backtick 2 5 5 $HOME/scripts/meminfo
 hardstatus alwayslastline "%{+b dw}:%{-b dw}:%{+b dk}[%{-b dg} %0C:%s%a %{=b dk}]-[   %{-b dw}Load%{+b dk}:%{-b dg}%l %{+b dk}] [%{-b dg}%2`%{+b dk}] %=[ %{-b dg}%1`%{=b dk} ]%{-b dw}:%{+b dw}:%<"

 sorendition "-b dw"

$HOME/scripts/meminfo

#!/bin/sh
RAM=`cat /proc/meminfo | grep "MemFree" | awk -F" " '{print $2}'`
SWAP=`cat /proc/meminfo | grep "SwapFree" | awk -F" " '{print $2}'`
echo -n "${RAM}kb/ram ${SWAP}kb/swap"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment