]> git.deb.at Git - debienna.git/blob - SebastianBachmann/Screenrc/index.mdwn
3c81978e45e9198c57297a8c7e8088a178e526fb
[debienna.git] / SebastianBachmann / Screenrc / index.mdwn
1 .screenrc:\r
2 {{{\r
3 backtick 1 0 10   /usr/bin/cpu-screen\r
4 backtick 2 0 30   /usr/bin/ip-screen\r
5 backtick 3 0 5    /usr/local/bin/bat_state.pyc\r
6 backtick 4 0 5    /usr/local/bin/meminfo.pyc\r
7 \r
8 # Wich screen windows should start\r
9 screen -t top 0 nice top\r
10 screen -t irssi 1 nice irssi\r
11 screen 2 zsh\r
12 # Local in META Screen by lefant\r
13 # screen -t localhost 1 screen -S local -d -RR \r
14 \r
15 # use %n to display the window number and %t for its title:\r
16   activity              "activity in %n (%t) [%w:%s]~"\r
17 \r
18 # pass on the "beep" (CTRL-G) by adding a '~':\r
19   bell                  "bell     in %n (%t) [%w:%s]~"\r
20 \r
21 # pow_detach_msg:       Message shown when session\r
22   pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended."\r
23 \r
24 # vbell_msg:            Message shown when the\r
25   vbell_msg             " *beep* "\r
26 \r
27 \r
28 defutf8               on  \r
29 login                 off \r
30 deflogin              off \r
31 startup_message       off \r
32 vbell                 on  \r
33 bell_msg        'Bell in %n'\r
34 \r
35 termcapinfo xterm*|linux*|rxvt*|Eterm* OP\r
36 \r
37 defscrollback         1000\r
38 #hardcopydir           ~/.screen\r
39 hardcopy_append       on  \r
40 shell                 zsh \r
41 \r
42 hardstatus alwayslastline\r
43 #caption always "%{wk}%?%-Lw%?%{kW}%n*%f %t%?(%u)%?%{wk}%?%+Lw"\r
44 caption always "%{b k}[ %{r}$USER@%{b}%H %{b}]%{w}[ %1` ]%{C}[ %4` ]%{B}[%= %2` %= ]%-62=%{Y}[ %{Y}%l ]%{b}[ %3` ]%{g}[ %0c ]%{w}[ %D %d.%m.%Y ]"\r
45 hardstatus string "%{g}%=%?%-Lw%?%{=b kR}(%{W}%n*%f %t%?(%u)%?%{=b kR})%{= kw}%?%+Lw%?%?%=%{g}"\r
46 \r
47 sorendition 10 99 # default!\r
48 \r
49 #idle 600 eval "screen cmatrix -o -f -u 9 -C red -s" "idle 0"\r
50 \r
51 #usefull binds\r
52   bind 'K' kill\r
53   bind 'I' login on\r
54   bind 'O' login off\r
55   bind '}' history\r
56   bind Q quit\r
57   bind G screen -t 'google'    w3m www.google.com\r
58   bind H screen -t HeiseTicker w3m www.heise.de/newsticker/pda/data/paket4.html\r
59   bind X lockscreen\r
60 }}}\r
61 \r
62 /usr/local/bin/bat_info.py (compile with py_compilefiles)\r
63 {{{\r
64 \r
65 import re\r
66 import string\r
67 \r
68 state = open("/proc/acpi/battery/BAT0/state","r").readlines()\r
69 info = open("/proc/acpi/battery/BAT0/info","r").readlines()\r
70 \r
71 \r
72 aktuell = string.join(re.findall("[0-9]", state[4]), '')\r
73 design = string.join(re.findall("[0-9]", info[1]), '')\r
74 full = string.join(re.findall("[0-9]", info[2]), '')\r
75 \r
76 aktuell = float(aktuell)\r
77 design = float(design)\r
78 full = float(full)\r
79 print "%.2f | %.2f" %((100/(design/aktuell)), (100/(design/full)))\r
80 }}}\r
81 \r
82 /usr/local/bin/meminfo.py\r
83 {{{\r
84 import re\r
85 import string\r
86 \r
87 mem = open("/proc/meminfo","r").readlines()\r
88 \r
89 all = float(string.join(re.findall("[0-9]",mem[0]), ''))/1048576\r
90 free = float(string.join(re.findall("[0-9]",mem[1]), ''))/1048576\r
91 swapall = float(string.join(re.findall("[0-9]",mem[11]), ''))/1048576\r
92 swapfree = float(string.join(re.findall("[0-9]",mem[12]), ''))/1048576\r
93 \r
94 print "%.2f/%.2f | %.2f/%.2f" %(free,all,swapfree,swapall)\r
95 }}}\r
96 \r
97 \r
98 Get your ip-screen and cpu-screen from GRML!