You are not logged in.

#51 2009-02-23 01:35:37

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

Re: Post your .screenrc with screenshots!

Zetsumei wrote:

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"

they are placed in the hardstatus string line, between the "|" i mean the numbers:

%1` is backtick 1 60 60 $HOME/bin/get_uptime
%2` is backtick 2 60 60 $HOME/bin/get_cputemp Core0
...

and they show in the bottom of your screen session, in the hardstatus line

Last edited by leo2501 (2009-02-23 01:37:28)


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

#52 2009-03-09 22:00:11

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

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

sorendition 00 07
hardstatus on
hardstatus alwayslastline "%-w %{+r} %n %t %{-} %+w %4`"

I'm not sure how it works either, but I've had this config for years and years, over a bunch of different OS's.

Offline

#53 2009-03-13 09:19:24

lividity
Member
Registered: 2009-03-12
Posts: 7

Re: Post your .screenrc with screenshots!

http://s5.tinypic.com/ofxbnp.jpg
http://s5.tinypic.com/k18dps.jpg



I use 2 different screen configs. 1 for the server 1 for home. For home use I wanted screen split in 4. Here's how.

Create an area to hold the source

cd ~/
mkdir screen
cd screen

Get the latest source

wget http://ftp.gnu.org/gnu/screen/screen-4.0.3.tar.gz

Extract the source

tar xvf screen-4.0.3.tar.gz

Download extract and apply vertical split patch

cd screen-4.0.3/
wget http://vsp4sdl.yuggoth.org/wrp_vertical_split_0.3_4.0.2.diff.bz2
bunzip2 wrp_vertical_split_0.3_4.0.2.diff.bz2
patch -p1 < wrp_vertical_split_0.3_4.0.2.diff

Build it

./configure && make

Install screen

sudo mv screen /usr/local/bin/

Use my .screenrc if you would like smile The window splitting is @ the bottom smile

nano ~/.screenrc

##########.screenrc##########
activity "%c activity -> %n%f %t"
autodetach on
altscreen on
bell "%c bell -> %n%f %t^G"
defflow auto
defscrollback 10000
defutf8 on
msgwait 2                 # 1 second messages
startup_message off        # disable the startup splash message
shell -bash
vbell_msg "[[[ ding ]]]"
vbell off
nethack on
zombie cr

# remove some key bindings
bind k
bind W
bind ^k
bind .
bind ^\
bind \\
bind ^h
bind h
# make them safer
bind 'K' kill
bind 'W' windowlist
bind 'V' vert_split

# F8 to turn the status bar off
#bindkey -k k8 hardstatus alwayslastline
# F9 to turn the status bar on
#bindkey -k k9 hardstatus alwaysignore
# F5 and F6 to move one screen forward or backward
bindkey -k k5 prev
bindkey -k k6 next


split
screen -t rtorrent rtorrent -o http_capath=/etc/ssl/certs
vert_split
focus up
screen -t irssi irssi
focus up
screen -t bash bash
focus down
vert_split
screen -t bash bash
focus down
select irssi

# If you need more terms then uncomment however many you need wink
#screen -t bash bash
#screen -t bash7 bash
#screen -t bash8 bash
#screen -t bash9 bash

########End of script########

Last edited by lividity (2009-03-13 10:53:49)

Offline

#54 2009-03-13 14:55:25

djnm
Member
From: USA
Registered: 2008-12-21
Posts: 78

Re: Post your .screenrc with screenshots!

@ lividity
The screen-git package in aur includes the vertical split patch. big_smile


br0tat0chip in #archlinux and on freenode

Offline

#55 2009-04-07 20:20:30

Wra!th
Member
Registered: 2009-03-31
Posts: 342

Re: Post your .screenrc with screenshots!

tMWhzdw

escape ^aa 
startup_message off
vbell on
msgwait 2
defscrollback 5000
defutf8 on
shell bash
shelltitle "$ |terminal"

hardstatus alwayslastline "%{= w}%-w%{= Bk} %n %t %{-}%+w %-="

screen -t "irssi"          0 bash
screen -t "terminal"    1 bash

MacGregor DESPITE THEM!
7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00

Offline

#56 2009-04-08 08:17:16

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: Post your .screenrc with screenshots!

Right, I am going to have to learn how to use screen now tongue

Last edited by Barrucadu (2009-04-08 08:42:32)

Offline

#57 2009-04-10 06:59:58

1LordAnubis
Member
Registered: 2008-10-10
Posts: 253
Website

Re: Post your .screenrc with screenshots!

snapshot72thumb.png

startup_message off
activity "%c activity -> %n%f %t"
caption always "%{= Wk}%-w%{= Bw}%n %t%{-}%+w %-="
vbell off
term screen-256color


bind 'K' kill
bind 'W' windowlist
bind 'V' split -v

# F8 to turn the status bar off
#bindkey -k k8 hardstatus alwayslastline
# F9 to turn the status bar on
#bindkey -k k9 hardstatus alwaysignore
# F5 and F6 to move one screen forward or backward
#bind F7 to change focus
bindkey -k k7 focus up
bindkey -k k5 prev
bindkey -k k6 next
screen -t irssi   1 irssi
split -v
focus down
screen -t htop  2 htop
select htop
split
focus down
screen -t Bash1  3 bash
select bash
focus down
select irssi
altscreen on

Any society that would give up a little liberty to gain a little security will deserve neither and lose both.
-Benjamin Franklin
The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man.
-George Bernard Shaw

Offline

#58 2009-04-11 22:33:32

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: Post your .screenrc with screenshots!

screen.png

#-*-conf-*-

startup_message off
autodetach      on
vbell           on

setenv LC_CTYPE en_GB.UTF-8
defutf8 on

termcapinfo rxvt-unicode ti@:te@
terminfo    rxvt-unicode ti@:te@:
term        screen-256color

bind V split -v

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

My weechat / ncmpcpp / rtorrent configs are here: http://www.barrucadu.co.uk/dotfiles.php

Offline

#59 2009-04-12 08:37:09

xd-0
Member
From: Sweden
Registered: 2007-11-02
Posts: 327
Website

Re: Post your .screenrc with screenshots!

Barrucadu wrote:

My weechat / ncmpcpp / rtorrent configs are here: http://www.barrucadu.co.uk/dotfiles.php

Thnx for your ncmpcpp conf. And love te minimal design of your site.

Offline

#60 2009-08-22 19:06:40

esquiso
Member
From: Oporto, Portugal
Registered: 2008-05-21
Posts: 15

Re: Post your .screenrc with screenshots!

Rise, thread, rise!

1zz19nq.png

# Tab bar

hardstatus off
hardstatus alwayslastline
hardstatus string "%{+b wk} %-w%{+b wk} %n %t %{-}%+w %41=%H @ %l %-= %= %D,%c:%s "

# Escape key

escape \\a

# To clear the screen after closing some programs

altscreen on

# Programs opening by default

screen -t "BASH" 1 
screen -t "MPD" 2 ncmpc
screen -t "IRC" 3 irssi
screen -t "HTOP" 4 htop

# Keys

bindkey -k k; quit

# COLORS! and some useful terminfo

term screen-256color
terminfo rxvt-unicode 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'

# Do not show startup message

startup_message off

Last edited by esquiso (2009-08-22 19:07:42)

Offline

#61 2009-08-24 20:53:46

benoror
Member
Registered: 2009-07-20
Posts: 66
Website

Re: Post your .screenrc with screenshots!


ArchLinux :: Awesome WM :: dotfiles

Offline

#62 2009-08-24 21:10:28

benoror
Member
Registered: 2009-07-20
Posts: 66
Website

Re: Post your .screenrc with screenshots!


ArchLinux :: Awesome WM :: dotfiles

Offline

#63 2009-08-25 01:08:30

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: Post your .screenrc with screenshots!

It seems ompload broke the thumbnail so you'll have to be lazy and click the link. http://omploader.org/vMjdtZQ

The information about updates and mail only shows up when there is an update or a new message.  The --INSERT-- text is only shown when the active screen is zsh and zsh is in insert mode.  If zsh is active and it's in normal mode, the text is --NORMAL--.  That trick was found somewhere on the internet and ties tightly in with my .zshrc.

The .screenrc can be found on my site below (or to the left).

Last edited by rson451 (2009-08-25 01:10:14)


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#64 2009-10-04 17:30:44

Lich
Member
Registered: 2009-09-13
Posts: 437

Re: Post your .screenrc with screenshots!

hardstatus alwayslastline '%{= dd}%{= Wr} %D %d %M %c > %{= Ww}%-w%{= Wk}%n %t%{= Ww}%+w %{= dd} %='

tMmhhdw


Archlinux | ratpoison + evilwm | urxvtc | tmux

Offline

#65 2009-10-08 16:24:49

skyshock21
Member
Registered: 2009-10-08
Posts: 1

Re: Post your .screenrc with screenshots!

This opens 6 screen windows, the 1st two are web and rtorrent, the next 4 open various directories I like to switch between quickly, and then the final statement (select 2) puts the focus on the window with the home directory:

screen -t Web elinks
screen -t rTorrent rtorrent
screen -t Home
chdir /media/Storage
screen -t Storage
chdir $HOME/python
screen -t Python
chdir $HOME/c
screen -t C
select 2

Offline

#66 2009-10-08 16:39:07

Lich
Member
Registered: 2009-09-13
Posts: 437

Re: Post your .screenrc with screenshots!

skyshock21 wrote:

This opens 6 screen windows, the 1st two are web and rtorrent, the next 4 open various directories I like to switch between quickly, and then the final statement (select 2) puts the focus on the window with the home directory:

screen -t Web elinks
screen -t rTorrent rtorrent
screen -t Home
chdir /media/Storage
screen -t Storage
chdir $HOME/python
screen -t Python
chdir $HOME/c
screen -t C
select 2

well this is in theory a screenrc, but this thread is more oriented towards the hardstatus/caption setup, rather than generic stuff that anyone can learn with `man screen`


Archlinux | ratpoison + evilwm | urxvtc | tmux

Offline

#67 2009-10-08 17:01:25

steve___
Member
Registered: 2008-02-24
Posts: 452

Re: Post your .screenrc with screenshots!

I disagree  :-|  I like seeing how anyone sets up their screenrc.  I find it's a fun way to learn.

Offline

#68 2009-10-08 17:36:01

Lich
Member
Registered: 2009-09-13
Posts: 437

Re: Post your .screenrc with screenshots!

steve___ wrote:

I disagree  :-|  I like seeing how anyone sets up their screenrc.  I find it's a fun way to learn.

do a `man screen`, way more educational


Archlinux | ratpoison + evilwm | urxvtc | tmux

Offline

#69 2009-11-20 11:38:42

dziq
Member
From: Olsztyn, Poland
Registered: 2008-03-26
Posts: 65
Website

Re: Post your .screenrc with screenshots!

I have problem with UTF-8 characters in hardstatus. I try to set it up for corrert display, but I can't
Here is my config

term screen-256color
terminfo rxvt-unicode 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
setenv LC_CTYPE pl_PL.UTF-8
defutf8 on
startup_message off
activity "%c activity -> %n%f %t"
autodetach on
altscreen on
bell "%c bell -> %n%f %t^G"
defflow auto
defscrollback 10000

# F8 to turn the status bar off
bindkey -k k8 hardstatus alwayslastline
# F9 to turn the status bar on 
bindkey -k k9 hardstatus alwaysignore
# F1 and F2 to move one screen forward or backward
bindkey -k k1 prev
bindkey -k k2 next
vbell_msg "[[[ ding ]]]"
vbell off
nethack on
backtick 1 60 60 /home/dziq/bin/screen_agenda
#hardstatus alwayslastline "%{.kK}[%1`@%H]"
hardstatus alwayslastline '%{gk}[ %{G}%H %{g}][%= %{wk}%?%-Lw%?%{=b kR}(%{W}%n*%f %t%?(%u)%?%{=b kR})%{= kw}%?%+Lw%?%?%= %{g}][%{Y}%l%{g}]%{=b C}[ %m/%d %c ]%{W} [%1`]'


#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}]'
screen -t zsh 1 zsh
#screen -t rtorrent   1 rtorrent
#screen -t ekg2      1 ekg2
#screen -t mail      1 mutt
#screen -t imap    2 offlineimap
#screen -t music     4 ncmpcpp

Offline

#70 2010-02-14 23:05:49

AskApache
Member
Registered: 2009-10-18
Posts: 16
Website

Re: Post your .screenrc with screenshots!

setenv LC_CTYPE en_US.UTF-8
defutf8 on
hardcopy_append on
crlf off
multiuser off
#deflogin on
bufferfile $HOME/.screen_buffer
pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended."  # Emulate a logout msg
msgwait 2         # 1 second messages
#silencewait 5
sorendition =s Gk

vbell off
vbell_msg " *beep* "
#activity "%c activity -> %n%f %t"
#bell "%c bell -> %n%f %t^G"

nethack on     # print wackier status messages
nonblock on    # If a window goes unresponsive, don't block the whole session waiting for it.
defnonblock 5  # flaky/slow ssh lines
altscreen on   # restore window contents after using (e.g.) vi
defmonitor on  # turn monitoring on
shell -$SHELL  # use the default shell
defbce on      # erase background with current bg color
defflow off    # disable Ctrl-S/Ctrl-Q "flow control"
#logfile ~/screen_%y-%m-%d_%0c


# terminfo and termcap for nice 256 color terminal
termcapinfo xterm*|rxvt-* 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
termcapinfo xterm*|rxvt-* 'hs:ts=\E]0;:fs=\007:ds=\E]0;\007'
termcapinfo xterm*|rxvt-* ti@:te=\E[3J
termcapinfo xterm*|rxvt-* hs@:cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l
termcapinfo xterm*|rxvt-* hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l
attrcolor b ".I"        # allow bold colors - necessary for some reason
term 'xterm-256color'   # 256 terminal for xterm
#term screen-256color   #By default, screen uses an 8-color terminal emulator. Use the following line to enable more colors, more-capable terminal emulator:



#
# hardstatus
#
hardstatus on
hardstatus alwayslastline
defhstatus "%{= 9}%-w%{= 9}%50>%n* %{= 9}%t%{= 9}%+w%< %=  %{= R} %{= 9}%c:%s"  # nice and simple
#hardstatus alwayslastline "%{=b}%{G} Screen(s): %{b}%w %=%{kG}%C%A  %D, %M/%d/%Y "
#hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %d/%m %{W}%c %{g}]'
#hardstatus alwayslastline "%{yk}( %{Y}%H %{y})%= %{wk}%?%-Lw%?%{R}(%{W}%n*%f %t%?(%u)%?%{R})%{w}%?%+Lw%?%?%= %{y}( %{Y}load: %l %{y})"
##hardstatus alwayslastline "%{=b kW}[ %{= Y}$USER @ %H %{b W}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{b W}][%{= Y} %l %{b W}][%{= Y} %d/%m %{Y}%c %{b W}]"
##hardstatus alwayslastline "%{=b kW}[ %{= Y}$USER @ %H %{b W}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{b W}][%{= Y} %m/%d/%y %{Y}%C %{b W}]"
##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}]'
##hardstatus alwayslastline "%{= kG}[ $USER@%{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %d.%m.%Y %{W}%c:%s %{g}]"
hardstatus string "%{.wB}%-w%{.bW}%n %t%{-}%+w %=%{..Lw} %H %{..b} %m/%d %C%a "


screen -t bash 0
screen -t bash 1
select 0


#bind T screen -t 'pstree' 2 sudo watch -n 2 -t pstree -p -u -c -l -a -A|sed -e 's/\\040//g'
#bind L screen -t 'log' 3 sudo tail -s3 -n 10 -f /var/log/everything.log
#caption always "%{yK} $LOGNAME@%H | %l | %C %A - %M-%d-%Y | %-Lw%50>%{Ky}%n%f* %t%{-}%+Lw%<%{- Wk}%{yK} | "
#caption always "%{= wk} %?%-Lw%?%{= kd} %n*%f %t %{= wk}%?%+Lw%? %{= wk}%=%{= Wk} %C%a %m-%d-%Y %{= wk} "
#caption always "%{=b kW}[%= %{= K}F8=List F9=new F10=title F11=prev F12=next %{=b kW}%=]"  #stolen and changed from cornfelt
#caption always " %m%d %c |  %w"
#caption always "%?%{ Wk}%-Lw%?%{Rk}%n*%f %t%?(%u)%?%?%{Wk}%+Lw%? %{Rk}%=%c %{rk}%d/%M/%Y"
#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}:"
#caption always "%{+b kG} %=%{-s} %{.K}%-w%{.B}%n %{.G}%t%{.K}%+w%{.G} %{+s} %="



# Finally! Shift-pg up or down to view scrollback buffer
#
bindkey "^[[5;2~" eval "copy" "stuff ^u"
bindkey -m "^[[5;2~" stuff ^u
bindkey -m "^[[6;2~" stuff ^d

Offline

#71 2010-04-24 13:48:35

AskApache
Member
Registered: 2009-10-18
Posts: 16
Website

Re: Post your .screenrc with screenshots!

term putty-256color
debug off
chdir $HOME
maxwin 11
verbose on
autodetach on
nethack on                      # print wackier status messages
password HJa4lhjDp4UIDlLA          # always of course
defobuflimit 4096
setenv LC_CTYPE en_US.UTF-8
defutf8 on
defencoding UTF-8

idle 360 eval "screen nice -n 19 /opt/s/cmatrix" "idle 360000 pow_detach"

shell -$SHELL                   # use the default shell
shelltitle '$ | bash'           # search | name for dynamic window titles

defmode 600
defmonitor off         # turn monitoring on
defnonblock 2             # flaky/slow ssh lines
defscrollback 15000     # 5000 line scrollback
deflog off
defbce on     # erase background with current bg color
defflow off  # will force screen to process ^S/^Q
deflogin on             # Log new screen windows in utmp.



hardcopy_append on
hardcopydir ~/.backups/.screen
bufferfile ~/.backups/.screen/buffer
logfile ~/.backups/.screen/screen_%y-%m-%d_%n

zombie cr # don't kill window after the process died
silencewait 4

startup_message off     # no way
autodetach on           # Never, ever turn this off.
zombie cr               # Keep dead windows around until I tell them to exit.
verbose on              # And show the command for the windows when they're resurrected.

altscreen on            # restore window contents after using (e.g.) vi
attrcolor b ".I"        # allow bold colors - necessary for some reason

msgwait 6               # 6 second messages
msgminwait 2
multiuser off

pow_detach_msg "Screen session of $LOGNAME $:cr:$:nl:ended." # emulate .logout message



# debug         -       debugging info is written to /tmp/debug/
# dumptermcap   -       Termcap entry written to "/home/srot/tmp/.screen/.termcap".
# info          -       (1,3)/(270,37)+5000 -(-)flow bce UTF-8 6(hellopwd)
# dinfo         -       (270,77) UTF-8 color iso2022

# ===============================================================
# Messages
# ===============================================================
# They are also the names of the commands that set the respective messages.  In every message there can be "meta
# strings" which are replaced by values.  A meta string starts with a percent sign and is then followed by one
# of the following letters: aAcCdDfFhHlmMnstuwWyY The meta strings usually refer to the current
# date and time or to a window title or number. There are also some specials like embedded branches (with %?),
# color codes (with %{xy}) and padding (with %=, %<, %>). you can find their description in the manual in section  "STRING ESCAPES":
#
#  %%      percent sign (the escape character itself)
#  %f      flags of the window
#  %F      sets %? to true if the window has the focus
#  %h      hardstatus of the window
#  %H      hostname of the system
#  %l      current load of the system
#  %n      window number
#  %t      window title
#  %u      all other users on this window
#  %w      all window numbers and names.
#  %-w     all window numbers up to the current window
#  %+w     all window numbers after the current window
#  %W      all window numbers and names except the current one
#
#  DATE VARS -- USELESS!
#  %a      either 'am' or 'pm' - according to the current time
#  %A      either 'AM' or 'PM' - according to the current time
#  %c      current time HH:MM in 24h format
#  %C      current time HH:MM in 12h format
#  %d      day number - number of current day
#  %D      Day's name - the weekday name of the current day
#  %m      month number
#  %M      month name
#  %s      seconds
#  %y      last two digits of the year number
#  %Y      full year number
# ===============================================================
vbell off                               # I like to hear the beep.
activity "%c activity -> %n%f %t^G"     # ^G makes it beep
bell "%c bell -> %n%f %t^G"             # likewise

###########################################################################################################################
 #
 # TERMINAL CONTROL
 # ae: Standout          # ct: Initialization    # es: Status Line
 # AL: Insdel Line       # cv: Cursor Motion     # ff: Cursor Motion
 # al: Insdel Line       # da: Scrolling         # fs: Status Line
# am: Wrapping          # dB: Pad Specs         # gn: Basic
# as: Standout          # db: Scrolling         # hc: Basic
# bc: Cursor Motion     # dC: Pad Specs         # hd: Half-Line
# bl: Bell              # DC: Insdel Char       # ho: Cursor Motion
# bs: Cursor Motion     # dc: Insdel Char       # hs: Status Line
# bt: Cursor Motion     # dF: Pad Specs         # hu: Half-Line
# bw: Cursor Motion     # DL: Insdel Line       # hz: Basic
# CC: Basic             # dl: Insdel Line       # i1: Initialization
# cd: Clearing          # dm: Insdel Char       # i3: Initialization
# ce: Clearing          # dN: Pad Specs         # IC: Insdel Char
# ch: Cursor Motion     # DO: Cursor Motion     # ic: Insdel Char
# cl: Clearing          # do: Cursor Motion     # if: Initialization
# CM: Cursor Motion     # ds: Status Line       # im: Insdel Char
# cm: Cursor Motion     # dT: Pad Specs         # in: Insdel Char
# co: Screen Size       # ec: Clearing          # ip: Insdel Char
# cr: Cursor Motion     # ed: Insdel Char       # is: Initialization
# cS: Scrolling         # ei: Insdel Char       # it: Initialization
# cs: Scrolling         # eo: Basic
#
termcapinfo * hs@

###########################################################################################################################
# COLOR:  colors codes are combinations of [attribute modifier] [color description]
# the manual talks of "attribute/color modifiers".
#
# 0 Black             .    leave color unchanged
# 1 Red               b    blue
# 2 Green             c    cyan
# 3 Brown / yellow    d    default color
# 4 Blue              g    green           b    bold
# 5 Purple            k    blacK           B    blinking
# 6 Cyan              m    magenta         d    dim
# 7 White             r    red             r    reverse
# 8 unused/illegal    w    white           s    standout
# 9 transparent       y    yellow          u    underline
#
# note: "dim" is not mentioned in the manual.
#hardstatus string "%-Lw%{= G0}%50>%n%f* %t%{-}%+Lw%<"

#hardstatus string "%?%F%{-b bc}%:%{-b bb}%?%C|%D|%M %d|%H|%0`%?%F%{+u wb}%? %L=%-Lw%45>%{+b by}%n%f* %t%{-}%+Lw%-0<"

#yaption always "%?%F%{.R.}%?%3n %t%? [%h]%?"
#caption always "%?%F%{-b bc}%:%{-b bb}%?%C|%D|%M %d|%H|%1`%?%F%{+u wb}%? %L=%-Lw%45>%{+b by}%n%f* %t%{-}%+Lw%-0<"
#hardstatus alwayslastline
#hardstatus string "%?%F%{-b bc}%:%{-b bb}%?%C|%D|%M %d|%H|%1`%?%F%{+u wb}%? %L=%-Lw%45>%{+b kG}%n%f* %t%{-}%+Lw%-0<"
hardstatus alwayslastline "[%02c] %`%-w%{=b bw}%n %t%{-}%+w"
# Make screen messages stand out a little more - black on bright green.
#sorendition "= kG"
#caption always "%{.wB}%-w%{.bW}%n %t%{-}%+w %=%{..Lw} %H %{..b} %m/%d %C%a "
caption always "%{cK}$LOGNAME %{bK}(%d %M %Y, %c) %{-}%{bW} %-w%{bW}%50>%{= wb}%n%f %t%{-}%+w%< %{-}"



###########################################################################################################################
#
# default windows
# L - LOGGING
# l - log to utmp
# ln - nolog to utmp
# O - better vt100 emul
# a - all terminal caps
# A - resize
# h - scrol lines
#
screen -t 'LOG' -h 0   1 nice -n 19 sh -c 'read -n1 -t1000000 -p "[ LOG ]" && exec sudo nice tail -n 60 -s 10 -f /var/log/everything.log | ccze -A'
screen -t 'MEM' -h 0   2 nice -n 19 sh -c 'read -n1 -t1000000 -p "[ MEM ]" && sleep 4 && tput civis; CLS=$`tput clear`; trap "tput cnorm; exit 0" 1 2 3; while :; do free -olt && sleep 2 && echo $CLS; done;'
screen -t 'NET' -h 0   3 nice -n 19 sh -c 'read -n1 -t1000000 -p "[ NET ]" && while :; do /bin/netstat --numeric-ports -a -e --tcp |sort --key=4 && sleep 5; done;'
screen -t 'WWW' lynx http://www.askapache.com/
screen -t '# |ROOT'    4 sh -c 'read -n1 -t1000000 -p "[ ROOT ]" && exec sudo su -'
screen -t 'askapache'      5 sh -c 'read -n1 -t1000000 -p "[ ASKAPACHE ]" && exec sudo su - askapache'
screen -t 'compiler'     6       sh -c 'read -n1 -t1000000 -p "[ srot ]" && exec sudo su - compiler'

#select 5
windowlist


# screen -t 'BASH4'     5 sh -c 'read -n1 -p "[ BASH4 ] && export SHELL=/bin/bash4 && /bin/bash4 -l'
# screen -h 5000 -t 'bash' 1
# screen -h 5000 -t 'root' 2
# sudo -i screen -h 5000 -t 'gator' 3
# $HOME/.ssh/start_control.sh select
# screen -h 100 -t 'log' 4 sudo sh -c 'nice tail -n 60 -s 10 -f /var/log/everything.log | ccze -A'
# screen -h 100 -t 'top' 5 nice top -c
# screen -h 100 -t 'netstat' 6 nice sh -c 'watch -n 30 -t netstat -ane'
# links http://www.askapache.com/






###########################################################################################################################
#
# CUSTOM keybindings
#
# bind ^t screen -t 'TOP' sh -c 'exec sudo nice /usr/bin/top'
# bind ^g screen -t 'LOG' sh -c 'exec sudo nice tail -s 3 -n 25 -f /usr/local/apache/logs/error_log /home/askapache/sites/askapache.com/logs/php_error.log|ccze -A'
# bind ^g screen -t 'gator' -$SHELL $HOME/.ssh/start_control.sh
# bind ^s screen -t 'root' sudo -i
###########################################################################################################################
# bindkey [@var{opts}] [@var{string} [@var{cmd} @var{args}]]
#
# keybindings
#
# remove some stupid / dangerous key bindings
bind k
bind ^k
bind ^.
bind .
bind ^\
bind \\
bind ^h
bind h
bind ^x
bind x
bind }
bind ^}

# Window numbering starts at 1, not 0
bind c screen 1
bind 0 select 10
bind = resize =
bind + resize +1
bind - resize -1
bind _ resize max

bind 'K' kill
bind 'X' lockscreen
bind 'I' login on
bind 'O' login off
bind '}' history


# Prepend/append register [/] to the paste if ^a^] is pressed.  autoindent mode in vi.
register [ "\033:se noai\015a"
register ] "\033:se ai\015a"
bind ^] paste [.]

# A better detach
bind ^D eval 'echo -p "\^\^D%080="' 'command -c detach'
bind -c detach d detach
bind -c detach ^D detach
bind -c detach D pow_detach

# This one is great, restarts/reloads screen
bind . eval 'source /etc/screenrc' 'echo "/etc/screenrc has been reloaded."'

###
# Use the function keys to switch among windows.
##
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 k; select 10
bindkey -k F1 select 11
bindkey -k F2 select 12
# windows 13-24 are Shift-Fn
#bindkey -k F3 select 13
#bindkey -k F4 select 14
#bindkey -k F5 select 15
#bindkey -k F6 select 16
#bindkey -k F7 select 17
#bindkey -k F8 select 18
#bindkey -k F9 select 19
#bindkey -k FA select 20



# vim: tw=78 ts=3 sw=3 et nowrap ft=screen paste nonumber nofoldenable

Here is my custom-built (for 256-colors + screen), I'd rather edit this and keep it backed up than fiddle with screen's termcapinfo stuff.

#       Reconstructed via infocmp from file: /usr/share/terminfo/p/putty-256color
putty-256color|PuTTY 0.58 with xterm 256-colors,
        am, bce, bw, ccc, hs, mir, msgr, xenl, xon,
        colors#256, it#8, ncv#22, pairs#32767,
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
        clear=\E[H\E[J, cnorm=\E[?25h, cr=^M,
        csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
        cud=\E[%p1%dB, cud1=\ED, cuf=\E[%p1%dC, cuf1=\E[C,
        cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\EM,
        dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M,
        dsl=\E]0;\007, ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K,
        enacs=\E(B\E)0, flash=\E[?5h\E[?5l, fsl=^G, home=\E[H,
        hpa=\E[%i%p1%dG, ht=^I, hts=\EH, il=\E[%p1%dL, il1=\E[L,
        ind=^J, indn=\E[%p1%dS, initc@,
        is2=\E7\E[r\E[m\E[?7h\E[?1;4;6l\E[4l\E8\E>\E]R,
        kb2=\E[G, kbs=\177, kcan=^C, kcbt=\E[Z, kcub1=\E[D,
        kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~,
        kend=\E[4~, kf1=\E[11~, kf10=\E[21~, kf11=\E[23~,
        kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~,
        kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~,
        kf2=\E[12~, kf20=\E[34~, kf3=\E[13~, kf4=\E[14~,
        kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
        khome=\E[1~, kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~,
        kspd=^Z, nel=^M^J, oc=\E]R, op=\E[39;49m, rc=\E8, rev=\E[7m,
        ri=\EM, rin=\E[%p1%dT, rmacs=^O, rmam=\E[?7l,
        rmcup=\E[2J\E[?47l, rmir=\E[4l, rmpch=\E[10m,
        rmso=\E[27m, rmul=\E[24m, rs2=\Ec\E[?1000l\E[?25h,
        s0ds=\E[10m, s1ds=\E[11m, s2ds=\E[12m, sc=\E7,
        setab=\E[48;5;%p1%dm, setaf=\E[38;5;%p1%dm, sgr0=\E[0m,
        smacs=^N, smam=\E[?7h, smcup=\E[?47h, smir=\E[4h,
        smpch=\E[11m, smso=\E[7m, smul=\E[4m, tbc=\E[3g, tsl=\E]0;,
        u6=\E[%i%p1%d;%p2%dR, u7=\E[6n, u8=\E[?6c, u9=\E[c,
        vpa=\E[%i%p1%dd,

Offline

#72 2010-06-04 04:06:24

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

Re: Post your .screenrc with screenshots!

gnuscreen.png

hardstatus alwayslastline "%?%{gk}%-Lw%?%{mk}%n*%f %t%?(%u)%?%?%{gk}%+Lw%?%{Yk} | %{yk}RPD: %{Bk}%1`"

gnuscreen2.png

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

gnuscreen3.png

hardstatus alwayslastline "%?%{rk}%-Lw%?%{Ck}%n*%f %t%?(%u)%?%?%{rk}%+Lw%?%{Yk} | %{mk}%1` %{yk}%=%2`"

Last edited by dmz (2010-06-04 07:23:08)

Offline

#73 2010-07-21 08:14:28

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: Post your .screenrc with screenshots!

hey guys, is there a way to autologin "su -".

here' my .screenrc

#Fix for residual editor text
#When you open a text editor like nano in screen and then close it, the text may stay visible in your terminal. To fix this, #put the following in your ~/.screenrc: 
altscreen on

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

# Turn welcome message off
startup_message off

# Increase the scrollback buffer
defscrollback 5000

# open these programs automatically on screen startup
screen -t bash 1 
screen -t bash 2
screen -t root 7 su -
screen -t mc 8 mc /home/x33a /home/x33a/Desktop
screen -t log 9 tail --follow=name --retry --lines=1000 /var/log/everything.log
screen -t htop 0 htop

Offline

#74 2011-07-18 00:00:08

Lite
Member
Registered: 2009-07-09
Posts: 6

Re: Post your .screenrc with screenshots!

I originally built my .screenrc by coming here, so I thought I'd contribute back my own:
tOWlxcQ

Backtick is a python script that can be found here: https://bbs.archlinux.org/viewtopic.php … 74#p930174

activity ''
altscreen on
attrcolor b ".I"   # allow bold colors - necessary for some reason
backtick 1 0 0 /usr/bin/ifpy -S -i 2 eth0
defbce on    # use current bg color for erased chars
defscrollback 5000
hardstatus off
hardstatus alwayslastline '%{= kw}%-w%{= m}%n %t%{-}%+w %-= %1` %{B}%d %D %{c}%c'
sorendition +b k
startup_message off
term xterm-256color
termcapinfo xterm* ti@:te@i   # X scrolling mechanism
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'   # tell screen how to set colors. AB = background, AF=foreground
vbell off

bind c screen 1
bind ^c screen 1
bind 0 select 10     
# F1 keybinds:
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

screen -t rTorrent  2
screen -t bash      3
screen -t bash      4
screen -t irssi     1

Offline

#75 2011-07-18 09:59:23

examon
Member
Registered: 2011-05-07
Posts: 208

Re: Post your .screenrc with screenshots!

Lich wrote:
hardstatus alwayslastline '%{= dd}%{= Wr} %D %d %M %c > %{= Ww}%-w%{= Wk}%n %t%{= Ww}%+w %{= dd} %='

http://omploader.org/tMmhhdw

What's the name of your browser? It looks good, I want to try it. smile

Offline

Board footer

Powered by FluxBB