A Blog about technology, linux, peer2peer, cool new downloads and software development.
Showing posts with label screen. Show all posts
Showing posts with label screen. Show all posts

Sunday, June 21, 2009

ubuntu screen profiles how to


sudo apt-get install -y screen-profiles
sudo apt-get install -y screen-profiles-extras

# to configure run ;
$ screen-profiles

Saturday, April 19, 2008

The best $TERM

The $TERM that works the best in regular shell and screen is :

export TERM=linux

Saturday, February 9, 2008

.screenrc

here is a .screenrc that displays various statistics like cpu, load avarages, memory, bandwidth utilization and display and easily switch between virtual windows (work like tabs)
escape char : ^x
create window ^x-c
switch between windows : F11/F12
Screenshot :

$ cat > ~/.screenrc
---------- 8< ---------- 8< ---------- 8< ----------




vbell on
startup_message off
shell -bash
term linux
#term screen-bce
#term xterm
defbce on
defscrollback 2000
defescape ^Xx
escape ^Xx
term screen-256color
defutf8 on
bindkey -k F1 prev # F11
bindkey -k F2 next # F12

backtick 0 10 10 awk '{ printf "%sC", $2 }' /proc/acpi/thermal_zone/THRM/temperature

backtick 1 60 60 awk '{if ($1=="MemTotal:") mt = $2; if ($1=="MemFree:") mm = $2; if ($1=="Buffers:") mb = $2; if ($1=="Cached:") mc = $2} END {printf ("%2.1f"), ((mt-(mm+mb+mc)) * 100 / mt);print "%M"}' /proc/meminfo

backtick 2 60 50 awk '{if ($1=="SwapFree:") fs = $2; if ($1=="SwapTotal:") ts = $2} END {printf ("%2.1f"),((ts-fs) * 100 / ts );print "%S"}' /proc/meminfo

backtick 3 0 0 awk 'BEGIN {file = "/proc/stat";while (a==a) {getline < u="$2-up;s=" n="$4-np;i=" up="$2;sp=" np="$4;i" p="$5;close(file);system(" file="/proc/net/dev" a="=" d="substr($1,6,10);u=" printf="" 1f="" k="" s="" pri="">
ntf "%4.1f k/s\n",((u-up)/1024)}};close(file);dp=d;up=u;system("sleep 2")}}'

caption always "%{wk}%H|%{wk}%0` %1` %2` %3` |%4` %{wk}| %{wk}%l%{wk} | %Y-%m-%d %c | %{+b w}%-w%{-b kw}%n %t%{-}%+w %-= %=%{wk}|"

Monday, January 28, 2008

.screenrc

A .screenrc file that :
- Displays a nice status line on the bottom of the screen
- opens 8 terminals by default.
- switch between windows with Alt-Arrow keys & Alt number

---------- 8< ---------- 8< ---------- 8< ---------- 8< ----------
$ cat .screenrc
defscrollback 3000

screen
screen
screen
screen
screen
screen
screen
screen

startup_message off

bindkey "^[1" select 0
bindkey "^[2" select 1
bindkey "^[3" select 2
bindkey "^[4" select 3
bindkey "^[5" select 4
bindkey "^[6" select 5
bindkey "^[7" select 6
bindkey "^[8" select 7
bindkey "^[9" select 8

bindkey -k k; quit

bindkey "^[^[OD" prev
bindkey "^[^[OC" next

select 0

caption string "%{= KW} %-w%{= BW}=%n %t=%{-}%+w %=%{= Yb} %H %{= KW} %{= Yb} %c:%s %d/%m/%Y"
caption always