Skip to content

Instantly share code, notes, and snippets.

@oxagast
Last active April 27, 2017 20:36
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 oxagast/6fb7ebab2bde29d0cd2c5e48effa5e6b to your computer and use it in GitHub Desktop.
Save oxagast/6fb7ebab2bde29d0cd2c5e48effa5e6b to your computer and use it in GitHub Desktop.
Screen Settings
startup_message off
#idle 1800 lockscreen
vbell off
msgwait 2
defscrollback 15000
defutf8 on
shell bash
shelltitle "$ |bash"
bind '/' eval "clear" "scrollback 0" "scrollback 15000"
bind = resize =
bind + resize +1
bind - resize -1
bind _ resize max
backtick 1 10 10 $HOME/.screenrc_cpuinfo.pl
backtick 2 0 0 $HOME/Code/wormulon -i wlp1s0
termcapinfo rxvt-unicode ti@:te@
caption always "%{= Wk}%?%-Lw%?%{+b Wk}%n*%t%f %?(%u)%?%{= Wk}%?%+Lw%?"
hardstatus lastline "%{+b Wk} %-w%{+b Wk} %H - %l - %1` - wlp1s0: %2` %-= %= %D,
%c:%s%a "
screen -t "bash" 1 bash
#!/usr/bin/perl
$howmany = `cat /proc/cpuinfo | grep vendor_ | wc -l`;
chomp($howmany);
$speed = `cat /proc/cpuinfo | grep \"model name\" | awk \'\{print \$NF\}\' | head -n 1`;
chomp($speed);
$memfree = `free -h | head -n 2 | awk '{print \$4}' | tail -n 1`;
$memtotal = `free -h | head -n 2 | awk '{print \$2}' | tail -n 1`;
$uptime = `uptime | cut -d ',' -f 1 | sed -e 's/^ //'`;
chomp($uptime);
chomp($memfree);
chomp($memtotal);
print "$howmany CPUs @ $speed - $memfree/$memtotal Free - $uptime";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment