Discussion forums for Arch Linux, a simple, lightweight linux distribution.
You are not logged in.
Zetsumei wrote:
Where do you place backticks and where do they show up in a screen session?
leo2501 wrote:
Playing with backtick's
Code:
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-22 20:37:28)
Offline
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.
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
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
The window splitting is @ the bottom ![]()
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 ![]()
#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 06:53:49)
Offline
@ lividity
The screen-git package in aur includes the vertical split patch. ![]()
Offline

Thanks for all the tips! Here is what I glow together from it
startup_message off
caption always "%{= Wk}%-w%{= Bw}%n %t%{-}%+w %-="
vbell off
term screen-256color
screen -t log 0 sudo tail -f /var/log/everything.log
screen -t Bash1 1
screen -t Bash2 2
screen -t Ncmpc++ 3 ncmpcpp
select 1
altscreen on
bindkey "^[[1;5D" prev # change window with ctrl-left
bindkey "^[[1;5C" next # change window with ctrl-rightUsed screen-git from AUR for the vertical splitting.
Been with Arch (happily off course) for about half a year and now comes my first post ![]()
Offline
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 bashOffline
Right, I am going to have to learn how to use screen now ![]()
Last edited by Barrucadu (2009-04-08 04:42:32)
Online
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 onOffline
#-*-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
Online
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
Rise, thread, rise!
# 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 offLast edited by esquiso (2009-08-22 15:07:42)
Offline
Here's mine! ![]()
http://web2.twitpic.com/img/25433266-bf … 3-full.png
Offline
Image url expired
: Here is it: http://twitpic.com/f54fm/full
benoror wrote:
Here's mine!
http://web2.twitpic.com/img/25433266-bf … 3-full.png
http://web2.twitpic.com/img/25433266-bf … 3-full.png
Offline
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-24 21:10:14)
Offline
hardstatus alwayslastline '%{= dd}%{= Wr} %D %d %M %c > %{= Ww}%-w%{= Wk}%n %t%{= Ww}%+w %{= dd} %='Online
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
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:
Code:
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`
Online
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
Online
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 ncmpcppOffline