You are not logged in.

#26 2008-10-23 20:01:40

dsr
Member
Registered: 2008-05-31
Posts: 187

Re: Post your .screenrc with screenshots!

strankan wrote:

Any way to get mem usage and free disk space into a .screenrc? Would be an awesome addition for my file server.

Yes. Use the backtick command with a shell script that parses the output of free and df. See my screenrc in post #7 for the backtick command syntax.

Offline

#27 2008-10-24 06:38:50

strankan
Member
From: Sundsvall - Sweden
Registered: 2006-11-08
Posts: 97

Re: Post your .screenrc with screenshots!

Thanks, that'll get me something to do at work smile

Offline

#28 2008-10-24 19:54:40

dsr
Member
Registered: 2008-05-31
Posts: 187

Re: Post your .screenrc with screenshots!

You're welcome...

Offline

#29 2008-10-25 10:41:01

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 658

Re: Post your .screenrc with screenshots!

Playing with backtick's smile

backtick 1 60 60 $HOME/bin/get_uptime
backtick 2 60 60 $HOME/bin/get_cputemp Core0
backtick 3 60 60 $HOME/bin/get_freemem
backtick 4 60 60 $HOME/bin/get_freeswap
backtick 5 60 60 $HOME/bin/get_volume PCM
backtick 6 60 60 $HOME/bin/get_gmail
backtick 7 60 60 $HOME/bin/get_updates

hardstatus string "%{.kc}%-w%{.kw}%n*%t%{-}%+w %= | %1` | %2`C | %3`/%4` | %5`% | %6`/%7` | %c %d/%m/%Y"

get_cputemp:

#!/bin/bash                                                                                                                                                             
sensors | grep $1 | awk '{print $3}' | tr -d +

get_freemem:

#!/bin/bash                                                                                                                                                             
free -m | grep - | awk '{print $4}'

get_freeswap:

#!/bin/bash                                                                                                                                                             
free -m | grep Swap | awk '{print $4}'

get_volume:

#!/bin/bash                                                                                                                                                             
status=$(amixer sget $1 | tail -n 1)                                                                                                                                    
vol=$(echo ${status} | gawk '{print $5}' | tr -d [%])                                                                                                                   
state=$(echo ${status} | gawk '{print $7}')                                                                                                                             
text="${vol}"                                                                                                                                                           
echo ${text}

get_gmail:

#!/bin/bash                                                                                                                                                             
gmail_login="xxxxxxxx"                                                                                                                                         
gmail_password="xxxxxxxxxxx"                                                                                                                                       
                                                                                                                                                                        
dane="$(wget --secure-protocol=TLSv1 --timeout=3 -t 1 -q -O - \                                                                                                         
https://${gmail_login}:${gmail_password}@mail.google.com/mail/feed/atom \                                                                                               
--no-check-certificate | grep 'fullcount' \                                                                                                                             
| sed -e 's/.*<fullcount>//;s/<\/fullcount>.*//' 2>/dev/null)"                                                                                                          
                                                                                                                                                                        
if [ -z "$dane" ]; then                                                                                                                                                 
        echo "!"                                                                                                                                                        
else                                                                                                                                                                    
        echo "$dane"                                                                                                                                                    
fi

get_updates:

#! /usr/bin/perl -w                                                                                                                                                     
use strict;                                                                                                                                                             
# November 15, 2006                                                                                                                                                     
# Daniel Vredenburg (Vredfreak)                                                                                                                                         
# This is a program that checks for package updates for Arch Linux users.                                                                                               
                                                                                                                                                                        
open (MYINPUTFILE, "/home/aleyscha/bin/arch-updates/updates.log") or die "No such file or directory: $!";                                                               
                                                                                                                                                                        
my $i = 0;                                                                                                                                                              
while(<MYINPUTFILE>)                                                                                                                                                    
{                                                                                                                                                                       
        if (/^(.*)\/(.*)(\..*\..*\.)/)  {
                #print " \n";
                $i++;
        }

}
if ($i == 0) {
        print "0";
} else {
        print "$i";
}
close(MYINPUTFILE);

Last edited by leo2501 (2008-10-25 10:56:13)


Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

#30 2008-10-25 10:47:14

klixon
Member
From: Nederland
Registered: 2007-01-17
Posts: 525

Re: Post your .screenrc with screenshots!

leo2501 wrote:

...

Nice! i do hope that's not your real gmail account-info though...


Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!

Offline

#31 2008-10-25 16:45:37

strankan
Member
From: Sundsvall - Sweden
Registered: 2006-11-08
Posts: 97

Re: Post your .screenrc with screenshots!

leo2501 wrote:

Playing with backtick's smile

backtick 1 60 60 $HOME/bin/get_uptime
backtick 2 60 60 $HOME/bin/get_cputemp Core0
backtick 3 60 60 $HOME/bin/get_freemem
backtick 4 60 60 $HOME/bin/get_freeswap
backtick 5 60 60 $HOME/bin/get_volume PCM
backtick 6 60 60 $HOME/bin/get_gmail
backtick 7 60 60 $HOME/bin/get_updates

hardstatus string "%{.kc}%-w%{.kw}%n*%t%{-}%+w %= | %1` | %2`C | %3`/%4` | %5`% | %6`/%7` | %c %d/%m/%Y"

get_cputemp:

#!/bin/bash                                                                                                                                                             
sensors | grep $1 | awk '{print $3}' | tr -d +

get_freemem:

#!/bin/bash                                                                                                                                                             
free -m | grep - | awk '{print $4}'

get_freeswap:

#!/bin/bash                                                                                                                                                             
free -m | grep Swap | awk '{print $4}'

get_volume:

#!/bin/bash                                                                                                                                                             
status=$(amixer sget $1 | tail -n 1)                                                                                                                                    
vol=$(echo ${status} | gawk '{print $5}' | tr -d [%])                                                                                                                   
state=$(echo ${status} | gawk '{print $7}')                                                                                                                             
text="${vol}"                                                                                                                                                           
echo ${text}

get_gmail:

#!/bin/bash                                                                                                                                                             
gmail_login="xxxxxxxx"                                                                                                                                         
gmail_password="xxxxxxxxxxx"                                                                                                                                       
                                                                                                                                                                        
dane="$(wget --secure-protocol=TLSv1 --timeout=3 -t 1 -q -O - \                                                                                                         
https://${gmail_login}:${gmail_password}@mail.google.com/mail/feed/atom \                                                                                               
--no-check-certificate | grep 'fullcount' \                                                                                                                             
| sed -e 's/.*<fullcount>//;s/<\/fullcount>.*//' 2>/dev/null)"                                                                                                          
                                                                                                                                                                        
if [ -z "$dane" ]; then                                                                                                                                                 
        echo "!"                                                                                                                                                        
else                                                                                                                                                                    
        echo "$dane"                                                                                                                                                    
fi

get_updates:

#! /usr/bin/perl -w                                                                                                                                                     
use strict;                                                                                                                                                             
# November 15, 2006                                                                                                                                                     
# Daniel Vredenburg (Vredfreak)                                                                                                                                         
# This is a program that checks for package updates for Arch Linux users.                                                                                               
                                                                                                                                                                        
open (MYINPUTFILE, "/home/aleyscha/bin/arch-updates/updates.log") or die "No such file or directory: $!";                                                               
                                                                                                                                                                        
my $i = 0;                                                                                                                                                              
while(<MYINPUTFILE>)                                                                                                                                                    
{                                                                                                                                                                       
        if (/^(.*)\/(.*)(\..*\..*\.)/)  {
                #print " \n";
                $i++;
        }

}
if ($i == 0) {
        print "0";
} else {
        print "$i";
}
close(MYINPUTFILE);

Sweet! big_smile

Offline

#32 2008-10-25 20:04:01

dsr
Member
Registered: 2008-05-31
Posts: 187

Re: Post your .screenrc with screenshots!

Awesome! I've never used backtick for anything other than parsing acpi's output. This thread really shows how flexible screen is. I totally agree with the author of this article that screen should win the "Most Undercelebrated Unix Tool" award.

Offline

#33 2008-10-26 19:24:02

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 658

Re: Post your .screenrc with screenshots!

dmz wrote:

Leo, thanks a lot for the bindkeys.

i recently noticed those keybindings don't work in the tty, but dont know why yet


Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

#34 2008-11-11 05:34:12

fflarex
Member
Registered: 2007-09-15
Posts: 466

Re: Post your .screenrc with screenshots!

@rine: Can I get your terminal colors?

I will post my screenrc in a day or so; I'm still working out the kinks. Great ideas here, though.

Offline

#35 2008-11-11 13:56:59

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: Post your .screenrc with screenshots!

leo2501 wrote:
dmz wrote:

Leo, thanks a lot for the bindkeys.

i recently noticed those keybindings don't work in the tty, but dont know why yet

Yeah I've also noticed that. If you find some way the get them working in tty's also, please notify me.

Offline

#36 2008-11-11 17:54:03

dawn
Member
Registered: 2008-01-15
Posts: 51

Re: Post your .screenrc with screenshots!

b3qu2k2kxyor9kd5b.png

Copied from various sources and adjusted.

# basic settings... self explainatory
deflogin on
autodetach on
startup_message off

# the dash makes it a login shell
defshell bash
activity ""
bell_msg ""
vbell off
vbell_msg ""
defscrollback 2048
nonblock on
defutf8 on
defbce on
defflow off
msgwait 1
altscreen on

# only Shift+k to kill - prevent accidents
bind k
bind ^k
bind K kill

escape \\\

term screen-256color
terminfo rxvt-unicode ti@:te@:
 
hardstatus alwayslastline "%{=}%-w%{+b w}%n %t%{-b w}%+w %=%c"
 
#let pgup/pgdn scroll under urxvt (see .Xdefaults)
bindkey "^[[5;2~" eval "copy" "stuff ^u"
bindkey -m "^[[5;2~" stuff ^u
bindkey -m "^[[6;2~" stuff ^d
select 1

Offline

#37 2009-02-13 11:46:26

jordz
Member
Registered: 2006-02-01
Posts: 248

Re: Post your .screenrc with screenshots!

screen404.png.xs.jpg

~/.screenrc

startup_message off
autodetach on
term screen-256color
vbell off
defscrollback 10000
termcapinfo xterm|xterms|xs|rxvt ti@:te@

backtick 1 3600 900 "/home/jordz/tmp/arch-updates/updates.pl"

hardstatus alwayslastline "%{= kw}%{g}[ %{G}%H %{g}] %{Y}pkgs: %{w}%1` %{g}[%=%{ =kw}%{w}%-w%{Y}[%{W}%n-%t%{Y}]%{w}%+w%=%{g}][ %{w}%d-%m %{Y}%c %{g}]"

screen -t htop htop
screen -t bash bash

updates.pl + hourly cron: pacman -Sy

#!/usr/bin/perl
use strict;
use warnings;
print ((`pacman -Qu` =~ m/^[^\s]+\s\((\d+)\):/m) ? $1 : 0);

Offline

#38 2009-02-15 17:40:23

dholt
Member
Registered: 2008-09-22
Posts: 9

Re: Post your .screenrc with screenshots!

screen.png

Offline

#39 2009-02-15 19:03:08

SamC
Member
From: Calgary
Registered: 2008-05-13
Posts: 611
Website

Re: Post your .screenrc with screenshots!

dholt: That looks great, but where's the .screenrc?

Offline

#40 2009-02-15 19:20:17

haxit
Member
From: /home/haxit
Registered: 2008-03-04
Posts: 1,247
Website

Re: Post your .screenrc with screenshots!

SamC wrote:

dholt: That looks great, but where's the .screenrc?

Made me lol.


Archi686 User | Old Screenshots | Old .Configs
Vi veri universum vivus vici.

Offline

#41 2009-02-15 19:38:41

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 658

Re: Post your .screenrc with screenshots!

tMTk2bA

Bottom bar is dwm's status bar

.screenrc

startup_message off
#termcapinfo xterm*|Eterm|mlterm|rxvt 'hs:ts=\E]0;:fs=\007:ds=\E]0;screen\007'
termcapinfo rxvt-unicode ti@:te@     #enable SHIFT-PGUP / SHIFT-PGDOWN scroll
#termcapinfo wy* CS=\E[?1h:CE=\E[?1l:vi=\E[?25l:ve=\E[?25h:VR=\E[?5h:VN=\E[?5l:cb=\E[1K:CD=\E[1J
terminfo rxvt-unicode ti@:te@:
term screen-256color
setenv LC_CTYPE en_US.UTF-8
defutf8 on
setenv DISPLAY ':0'
nonblock on
vbell off
msgwait 10
shelltitle ''
#defmonitor on

screen    -t '' 1 
screen    -t '' 2 
screen    -t '' 3 
screen    -t '' 4 
screen    -t '' 5 
screen    -t '' 6 
screen    -t '' 7 top
screen    -t '' 8 sudo inotail -f -n 30 /var/log/everything.log
screen    -t '' 9
#select 9

bind = resize =
bind + resize +1
bind - resize -1
bind _ resize max
bind c screen 1 # Window numbering starts at 1, not 0.
bind 0 select 10
# make life easier, f1-f10 selects screens 0-9
#bindkey -k k1 select 1
#bindkey -k k2 select 2
#bindkey -k k3 select 3
#bindkey -k k4 select 4
#bindkey -k k5 select 5
#bindkey -k k6 select 6
#bindkey -k k7 select 7
#bindkey -k k8 select 8
#bindkey -k k9 select 9
#bindkey -k k0 select 0
# windows select with Shift-Fn. May not work in all terminals.
# (screen only seems to understand up to FA)
#bindkey -k F3 select 1
#bindkey -k F4 select 2
#bindkey -k F5 select 3
#bindkey -k F6 select 4
#bindkey -k F7 select 5
#bindkey -k F8 select 6
#bindkey -k F9 select 7
#bindkey -k FA select 8
#bindkey -k k7 detach # bind F7  to detach screen session from this terminal
#bindkey -k k8 kill   # bind F8  to kill current screen window.
#bindkey -k k9 next   # bind F9 to move to previous window
#bindkey -k F1 prev   # bind F11 to move to next window
#bindkey -k F2 hardstatus alwaysignore # F12 to turn the status bar on
#bindkey -k k9 screen # bind F9  to create a new screen
#bindkey -k k; title  # bind F10 to rename current screen window
#bindkey -k F1 prev   # bind F11 to move to previous window
#bindkey -k F2 next   # bind F12 to move to next window
bindkey "^[Od" prev  # change window with ctrl-left
bindkey "^[Oc" next  # change window with ctrl-right

#let pgup/pgdn scroll under urxvt (see .Xdefaults)
bindkey "^[[5;2~" eval "copy" "stuff ^u"
bindkey -m "^[[5;2~" stuff ^u
bindkey -m "^[[6;2~" stuff ^d

# add CPU idle/sustem/user/interrupt stats
#backtick 100 5 5 tail -1 /var/tmp/vermaden-stats-top
#caption always '%{= wk} %= %100` %='
#backtick 1 60 60 $HOME/bin/get_uptime
backtick 2 60 60 $HOME/bin/get_cputemp temp1
backtick 3 60 60 $HOME/bin/get_freemem
backtick 4 60 60 $HOME/bin/get_freeswap
backtick 5 60 60 $HOME/bin/get_volume PCM
backtick 6 60 60 $HOME/bin/get_gmail
backtick 7 600 600 $HOME/bin/get_updates
#backtick 8 60 60 $HOME/bin/get_citytemp | grep Temperature | awk '{print $3}'
backtick 9 60 60 $HOME/bin/get_batterycharge

# An alternative hardstatus to display a bar at the bottom listing the
# windownames and highlighting the current windowname in blue. (This is only
# enabled if there is no hardstatus setting for your terminal)
hardstatus on
hardstatus alwayslastline
#hardstatus string "%w"
#hardstatus string "%{.kW}%-w%{.W}%n %t%{-}%+w"
#hardstatus string "%{.kW}%-w%{.W}%n %t%{-}%+w %=%c %d/%m/%Y" #black+white+bold
#hardstatus string "%{.kw}%-w%{.w}%n %t%{-}%+w %=%c %d/%m/%Y" #black+white+normal
#hardstatus string "%{.kw}%-w%{.Kw}%n %t%{-}%+w %=%c %d/%m/%Y" #black+grey+normal
#hardstatus string "%{.kc}%-w%{.kc}%n*%t%{-}%+w %=%c %d/%m/%Y" #black+cyan+normal
hardstatus string "%{.kc}%-w%{.kw}%n*%t%{-}%+w %= %2` %3`/%4` %6`/%7` %5`/%9` %c %d/%m/%Y" #black+cyan+normal+white selected
#hardstatus string "%{.kc}%-w%{.kw}%n*%t%{-}%+w %= | %1` | %2`C | %3`/%4` | %6`/%7` | %5` | %c %d/%m/%Y" #with dwm status bar
#hardstatus string '%{= kB}%-Lw%{+r}%50> %n%f* %t%{= kB}%+Lw%< %{= kB}%-= %{-}'
#hardstatus alwayslastline '%{bk}[ %{W}%H %{b}][ %{w}%l%{b} ]   %{b}[%{w} %D %d.%m %c:%s%{b} ]'
sorendition kw

# hardcopydir:  The directory which contains all hardcopies.
hardcopydir /home/aleyscha/.hardcopy

Last edited by leo2501 (2009-02-15 19:40:57)


Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

#42 2009-02-15 19:44:57

haxit
Member
From: /home/haxit
Registered: 2008-03-04
Posts: 1,247
Website

Re: Post your .screenrc with screenshots!

leo2501 wrote:

http://omploader.org/tMTk2bA

Bottom bar is dwm's status bar

.screenrc

startup_message off
#termcapinfo xterm*|Eterm|mlterm|rxvt 'hs:ts=\E]0;:fs=\007:ds=\E]0;screen\007'
termcapinfo rxvt-unicode ti@:te@     #enable SHIFT-PGUP / SHIFT-PGDOWN scroll
#termcapinfo wy* CS=\E[?1h:CE=\E[?1l:vi=\E[?25l:ve=\E[?25h:VR=\E[?5h:VN=\E[?5l:cb=\E[1K:CD=\E[1J
terminfo rxvt-unicode ti@:te@:
term screen-256color
setenv LC_CTYPE en_US.UTF-8
defutf8 on
setenv DISPLAY ':0'
nonblock on
vbell off
msgwait 10
shelltitle ''
#defmonitor on

screen    -t '' 1 
screen    -t '' 2 
screen    -t '' 3 
screen    -t '' 4 
screen    -t '' 5 
screen    -t '' 6 
screen    -t '' 7 top
screen    -t '' 8 sudo inotail -f -n 30 /var/log/everything.log
screen    -t '' 9
#select 9

bind = resize =
bind + resize +1
bind - resize -1
bind _ resize max
bind c screen 1 # Window numbering starts at 1, not 0.
bind 0 select 10
# make life easier, f1-f10 selects screens 0-9
#bindkey -k k1 select 1
#bindkey -k k2 select 2
#bindkey -k k3 select 3
#bindkey -k k4 select 4
#bindkey -k k5 select 5
#bindkey -k k6 select 6
#bindkey -k k7 select 7
#bindkey -k k8 select 8
#bindkey -k k9 select 9
#bindkey -k k0 select 0
# windows select with Shift-Fn. May not work in all terminals.
# (screen only seems to understand up to FA)
#bindkey -k F3 select 1
#bindkey -k F4 select 2
#bindkey -k F5 select 3
#bindkey -k F6 select 4
#bindkey -k F7 select 5
#bindkey -k F8 select 6
#bindkey -k F9 select 7
#bindkey -k FA select 8
#bindkey -k k7 detach # bind F7  to detach screen session from this terminal
#bindkey -k k8 kill   # bind F8  to kill current screen window.
#bindkey -k k9 next   # bind F9 to move to previous window
#bindkey -k F1 prev   # bind F11 to move to next window
#bindkey -k F2 hardstatus alwaysignore # F12 to turn the status bar on
#bindkey -k k9 screen # bind F9  to create a new screen
#bindkey -k k; title  # bind F10 to rename current screen window
#bindkey -k F1 prev   # bind F11 to move to previous window
#bindkey -k F2 next   # bind F12 to move to next window
bindkey "^[Od" prev  # change window with ctrl-left
bindkey "^[Oc" next  # change window with ctrl-right

#let pgup/pgdn scroll under urxvt (see .Xdefaults)
bindkey "^[[5;2~" eval "copy" "stuff ^u"
bindkey -m "^[[5;2~" stuff ^u
bindkey -m "^[[6;2~" stuff ^d

# add CPU idle/sustem/user/interrupt stats
#backtick 100 5 5 tail -1 /var/tmp/vermaden-stats-top
#caption always '%{= wk} %= %100` %='
#backtick 1 60 60 $HOME/bin/get_uptime
backtick 2 60 60 $HOME/bin/get_cputemp temp1
backtick 3 60 60 $HOME/bin/get_freemem
backtick 4 60 60 $HOME/bin/get_freeswap
backtick 5 60 60 $HOME/bin/get_volume PCM
backtick 6 60 60 $HOME/bin/get_gmail
backtick 7 600 600 $HOME/bin/get_updates
#backtick 8 60 60 $HOME/bin/get_citytemp | grep Temperature | awk '{print $3}'
backtick 9 60 60 $HOME/bin/get_batterycharge

# An alternative hardstatus to display a bar at the bottom listing the
# windownames and highlighting the current windowname in blue. (This is only
# enabled if there is no hardstatus setting for your terminal)
hardstatus on
hardstatus alwayslastline
#hardstatus string "%w"
#hardstatus string "%{.kW}%-w%{.W}%n %t%{-}%+w"
#hardstatus string "%{.kW}%-w%{.W}%n %t%{-}%+w %=%c %d/%m/%Y" #black+white+bold
#hardstatus string "%{.kw}%-w%{.w}%n %t%{-}%+w %=%c %d/%m/%Y" #black+white+normal
#hardstatus string "%{.kw}%-w%{.Kw}%n %t%{-}%+w %=%c %d/%m/%Y" #black+grey+normal
#hardstatus string "%{.kc}%-w%{.kc}%n*%t%{-}%+w %=%c %d/%m/%Y" #black+cyan+normal
hardstatus string "%{.kc}%-w%{.kw}%n*%t%{-}%+w %= %2` %3`/%4` %6`/%7` %5`/%9` %c %d/%m/%Y" #black+cyan+normal+white selected
#hardstatus string "%{.kc}%-w%{.kw}%n*%t%{-}%+w %= | %1` | %2`C | %3`/%4` | %6`/%7` | %5` | %c %d/%m/%Y" #with dwm status bar
#hardstatus string '%{= kB}%-Lw%{+r}%50> %n%f* %t%{= kB}%+Lw%< %{= kB}%-= %{-}'
#hardstatus alwayslastline '%{bk}[ %{W}%H %{b}][ %{w}%l%{b} ]   %{b}[%{w} %D %d.%m %c:%s%{b} ]'
sorendition kw

# hardcopydir:  The directory which contains all hardcopies.
hardcopydir /home/aleyscha/.hardcopy

Looks awesome!


Archi686 User | Old Screenshots | Old .Configs
Vi veri universum vivus vici.

Offline

#43 2009-02-15 19:55:24

dholt
Member
Registered: 2008-09-22
Posts: 9

Re: Post your .screenrc with screenshots!

It's not that special so I didn't include it.. but here you go.

startup_message off
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][ %{B}%Y-%m-%d %{W}%c %{g}]'

escape "^  "
bindkey "^[Od" prev
bindkey "^[Oc" next

screen -t bash        0
screen -t bash        1
screen -t ncmpcpp    3 ncmpcpp
screen -t root        4 su -
screen -t rtorrent    5 rtorrent

Offline

#44 2009-02-15 21:15:57

Daisuke_Aramaki
Member
From: ++49/711
Registered: 2008-10-06
Posts: 651
Website

Re: Post your .screenrc with screenshots!

Nothing special here as well!

Screenshot

screen-bsd.jpg

screenrc

startup_message    off
vbell        off
defscrollback    512
shell        -$SHELL
shelltitle    sh
autodetach on

# enable SHIFT-PGUP / SHIFT-PGDOWN scroll
termcapinfo rxvt ti@:te@

# change window with ALT-Q ALT-W
bindkey "^[q" prev
bindkey "^[w" next

# F1-F4 switch
# bindkey -k k1 select 1
# bindkey -k k2 select 2
# bindkey -k k3 select 3
# bindkey -k k4 select 4

# unbind defaults
bind ^m
bind ^i
bind ^f
bind ^s
bind ^w

# keyboard shortcuts
bind ^m screen -t mpd  ncmpc                     # C-a-m
bind ^i screen -t icq  centericq                 # C-a-i
bind ^f screen -t fish fish                      # C-a-f
bind ^s screen -t bge0 slurm -i bge0             # C-a-s
bind ^w screen -t wpi0 slurm -i wpi0             # C-a-w

# startup sessions
screen -t sh    0 
screen -t sh    1
select 0

# status
hardstatus alwayslastline '%{= M} %H%{= G} %l %= %{= w}%-w%{+b r}%n*%t%{-b r}%{w}%+w %= %{c}%d %D %{B}%c '

# add CPU idle/sustem/user/interrupt stats
backtick 100 5 5 tail -1 /var/tmp/mprem.stats.top
caption always '%{= wk} %200` %= %100` %='

"You know what I found? Right in the kernel, in the heart of the operating system, I found a developer's comment that said, `Does this belong here?`" -- Simon Lok about Linux kernel in 2005
Reflections on the Strange and the not so Strange
http://skinwalker.wordpress.com

Offline

#45 2009-02-15 21:47:46

Barghest
Member
From: Hanau/Germany
Registered: 2008-01-03
Posts: 563

Re: Post your .screenrc with screenshots!

Daisuke, what colorscheme do you use for vim?

Offline

#46 2009-02-15 22:00:35

Daisuke_Aramaki
Member
From: ++49/711
Registered: 2008-10-06
Posts: 651
Website

Re: Post your .screenrc with screenshots!

Barghest wrote:

Daisuke, what colorscheme do you use for vim?

Just the tango color scheme mate.


"You know what I found? Right in the kernel, in the heart of the operating system, I found a developer's comment that said, `Does this belong here?`" -- Simon Lok about Linux kernel in 2005
Reflections on the Strange and the not so Strange
http://skinwalker.wordpress.com

Offline

#47 2009-02-17 03:13:23

ste
Member
Registered: 2006-05-23
Posts: 15

Re: Post your .screenrc with screenshots!

screen.png

fascinating setup i'm sure you will agree

Offline

#48 2009-02-22 14:00:23

Ankka
Member
From: Finland
Registered: 2007-04-08
Posts: 98

Re: Post your .screenrc with screenshots!

ste... I'm missing your config file.

I really really have an extremely hard time understanding the status line config in screen, somehow the way the colors act just doesn't make any sense and doesn't resemble any other config I've used, and I never get the colors I'm looking for. Yours happen to be somewhat like my goal. smile

Offline

#49 2009-02-22 15:32:28

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: Post your .screenrc with screenshots!

Ankka wrote:

ste... I'm missing your config file.

I really really have an extremely hard time understanding the status line config in screen, somehow the way the colors act just doesn't make any sense and doesn't resemble any other config I've used, and I never get the colors I'm looking for. Yours happen to be somewhat like my goal. smile

Blah. You have to guess, that's the fun part of configuring screen!

Offline

#50 2009-02-23 00:07:46

Zetsumei
Member
From: NC
Registered: 2007-09-13
Posts: 156

Re: Post your .screenrc with screenshots!

Where do you place backticks and where do they show up in a screen session?

leo2501 wrote:

Playing with backtick's smile

backtick 1 60 60 $HOME/bin/get_uptime
backtick 2 60 60 $HOME/bin/get_cputemp Core0
backtick 3 60 60 $HOME/bin/get_freemem
backtick 4 60 60 $HOME/bin/get_freeswap
backtick 5 60 60 $HOME/bin/get_volume PCM
backtick 6 60 60 $HOME/bin/get_gmail
backtick 7 60 60 $HOME/bin/get_updates

hardstatus string "%{.kc}%-w%{.kw}%n*%t%{-}%+w %= | %1` | %2`C | %3`/%4` | %5`% | %6`/%7` | %c %d/%m/%Y"

get_cputemp:

#!/bin/bash                                                                                                                                                             
sensors | grep $1 | awk '{print $3}' | tr -d +

get_freemem:

#!/bin/bash                                                                                                                                                             
free -m | grep - | awk '{print $4}'

get_freeswap:

#!/bin/bash                                                                                                                                                             
free -m | grep Swap | awk '{print $4}'

get_volume:

#!/bin/bash                                                                                                                                                             
status=$(amixer sget $1 | tail -n 1)                                                                                                                                    
vol=$(echo ${status} | gawk '{print $5}' | tr -d [%])                                                                                                                   
state=$(echo ${status} | gawk '{print $7}')                                                                                                                             
text="${vol}"                                                                                                                                                           
echo ${text}

get_gmail:

#!/bin/bash                                                                                                                                                             
gmail_login="xxxxxxxx"                                                                                                                                         
gmail_password="xxxxxxxxxxx"                                                                                                                                       
                                                                                                                                                                        
dane="$(wget --secure-protocol=TLSv1 --timeout=3 -t 1 -q -O - \                                                                                                         
https://${gmail_login}:${gmail_password}@mail.google.com/mail/feed/atom \                                                                                               
--no-check-certificate | grep 'fullcount' \                                                                                                                             
| sed -e 's/.*<fullcount>//;s/<\/fullcount>.*//' 2>/dev/null)"                                                                                                          
                                                                                                                                                                        
if [ -z "$dane" ]; then                                                                                                                                                 
        echo "!"                                                                                                                                                        
else                                                                                                                                                                    
        echo "$dane"                                                                                                                                                    
fi

get_updates:

#! /usr/bin/perl -w                                                                                                                                                     
use strict;                                                                                                                                                             
# November 15, 2006                                                                                                                                                     
# Daniel Vredenburg (Vredfreak)                                                                                                                                         
# This is a program that checks for package updates for Arch Linux users.                                                                                               
                                                                                                                                                                        
open (MYINPUTFILE, "/home/aleyscha/bin/arch-updates/updates.log") or die "No such file or directory: $!";                                                               
                                                                                                                                                                        
my $i = 0;                                                                                                                                                              
while(<MYINPUTFILE>)                                                                                                                                                    
{                                                                                                                                                                       
        if (/^(.*)\/(.*)(\..*\..*\.)/)  {
                #print " \n";
                $i++;
        }

}
if ($i == 0) {
        print "0";
} else {
        print "$i";
}
close(MYINPUTFILE);

Offline

Board footer

Powered by FluxBB