screenrc, ratpoisonrc

Looking through more of my stats, it’s apparent I’m getting more hits for (a) jwm themes and (b) content related to GNU screen and ratpoison/dwm.

Here are current versions of my .screenrc and .ratpoisonrc files. Neither is extremely lengthy because I’ve streamlined my app selection and dmenu makes launching things a lot easier than setting up in a window manager configuration file. Most of my file management is either in vifm or mc. Because vifmrc integrates well with screen, it’s my preference (also as evidenced by my vifmrc). Each file below comes from ideas from various sources online which are unattributed in my own versions. Suffice to say, if you do a search and see something familiar (such as my hardline caption) you’ll probably figure out where I found it. That said, there are plenty of similar versions so whomever wants to take credit certainly may because I don’t.

————————————————-

# my .screenrc
# my hardline caption on bottom * replace this l with H for host
caption always "%?%F%{-b yk}%:%{-b bb}%?%l %{-b ck}%M %d %c %?%F%{-b rk}%? %L=%-Lw%45>%{-b gk}%n%f* %t%{-}%+Lw%-0<"
# screen messages
sorendition "+b wr"
activity "%c activity -> %n%f %t"
bell "%c bell -> %n%f %t^G"
vbell_msg " *wtf?!* "
# settings
startup_message off
deflogin on
autodetach on
shell mksh
vbell off
defscrollback 500
defnonblock 5
# my start up apps and windows:
screen -t aim
screen -t vifm vifm
screen -t elinks
screen -t mail
screen -t mksh
-------------------------------------------------

And here’s my ratpoisonrc.

# .ratpoisonrc
###########################################################
# some ratpoison eye candy
set border 0
set barpadding 0 0 0 0
set padding 0 0 0 0
set fgcolor yellow
set bgcolor red
set font -xos4-terminus-medium-r-normal-*-*-140-*-*-c-*-iso8859-1
# REBIND DEFAULT ESCAPE TO space
escape C-space
# BIND KEYS -- keep in alphabetical order
# NOTE: can overwrite, just don't overwrite navigation n,p
bind W exec sleep 5; import -window root screen-$(date +%Y%m%d%H%M%S).png
bind f exec firefox
###########################################################
# DEFINE KEYS
# -- use keys similar to dwm to ease transitions
# and because they don't clobber much else...
# motion and wm control
definekey top M-Tab next
definekey top C-M-Tab prev
definekey top C-M-r restart
# applications and utilities
definekey top M-P exec $(dmenu_path|dmenu)
definekey top M-Y exec slock
definekey top M-F exec /opt/firefox/firefox
definekey top M-S exec /opt/sylpheed-1.0.6/bin/sylpheed
definekey top M-G exec gvim
definekey top M-D exec dillo
definekey top M-Z exec aterm -T screen -e screen -DR
definekey top M-M exec aterm -T mc -e mc
definekey top M-X exec /usr/games/xtris
definekey top M-C exec aterm -T calcurse -e calcurse
definekey top M-V exec aterm -T vifm -e vifm
definekey top M-T exec aterm -T tunes -e mocp --theme transparent-background
definekey top M-E exec emelfm
###########################################################
# ALIASES
alias screenshot exec import -window root screenshot-$(date +%Y%m%d%H%M%S).png
alias dscreenshot exec sleep 5; import -window root screenshot-$(date +%Y%m%d%H%M%S).png

———————————————————

A few notes on the above. I don’t know if the formatting in the .screenrc will carry over but I switch between hostname (H) and loadaverages (l) and that’s just a fast cue for me in my old age. I tend to use H more than l to keep sessions over ssh clearer and more distinct. The status line uses different colors for the load averages (yellow), date (cyan), and windows (green active, red inactive) all on black — this works better for me than other things I’ve tried, but it’s definitely a matter of personal taste. The “defnonblock 5” may no longer be necessary, but is among recommendations I’d seen posted in the Debian developers’ changelogs and also in Gentoo’s ebuild changelog to get screen to behave better with slower SSH sessions (iirc — could be something else?). I prefer to open most apps on my own, so only vifm is executed when starting screen; this also reduces resource requirements in the event I have a terminal open already running any other app. I don’t use a large screen scrollback (or in zsh) because it clogs up RAM and is redundant to my .histfile. (I’ll do a productivity post about shells shortly.)

I’ve re-bound nearly all my commands in .ratpoisonrc using definekeys. I noted why in my comments but I also wanted to avoid clobbering default ratpoison bindings as much as possible (except S and s! I may disable those anyway because I don’t care to split my screen) and the dwm keybindings are very sensible to me since they don’t seem to clobber anything else and they don’t require the escape prefix like I’d been doing (so it reduces keystrokes). It’s a lot easier for me to do alt-S than ctrl-space-shift-S; my emacs days are over and the less cumbersome keybindings I have to remember the better. I’ve experimented with various escape sequences and the space key is working a little better than z (now I can suspend programs and commands again). Nearly all my posted ratpoison screenshots are from ctrl-space-W. You can see that I can switch between windows with the default keybindings or with the standard alt-tab and ctrl-alt-tab. I also added a binding to restart. No, the two firefox commands aren’t redundant; I use more than one version. I also have to use the path to xtris because I didn’t add it to my zsh (default shell) path.

I can’t say enough about dmenu. I took out the customized menu I run, suffice to say you can pipe just about anything you want to dmenu to launch things as you see fit. I also edited the dmenu config.h to suit my tastes for colors and font so I don’t have to mess with that in anything else.

Edited 22 June 2009 to remove HTML formatting for .screenrc and .ratpoisonrc; changed shell to mksh.

Advertisements

One Response to “screenrc, ratpoisonrc”

  1. Ratpoison : a list of configuration examples « Day-2-Day Linux Says:

    […] CONFIGURATION 1 : lucky13linux […]

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: