Forgot your password?
typodupeerror
User Journal

thinkninja's Journal: .screenrc

Journal by thinkninja

Got online again Friday thanks to a new USR 56k external modem. The old Lucent chipset winmodem died a peculiar death earlier in the week. It still dialed but it wasn't actually sending tones down the wire. I thought perhaps the jack had come off the board but I couldn't see anything physically wrong with it.

The good: No more problems with Linuxant drivers.
The bad: Spending $$$ on something that will become redundant in 37 days when DSL is finally available here.

Oh yeah, let's talk about that for a second. The engineer estimates distance from the exchange at ~5km, meaning that I may not be close enough to get ADSL. However, RDSL (Rate adapative) has a range of 11km so I will definitely be able to get that. I've also heard that all ADSL is actually RDSL anyway...

So, the bottom line here is that my connection may be absolute shit depending on line noise. Surprise, sur-fucking-prise.

* * *

screen.jpg [556Kb]

Another productive Sunday.

Really awful GIMP jpeg compression on the black-on-red irssi topic there. Don't know if that's the GIMP or just JPEG in general. Oh well.

That's shot of my fullscreen terminal workspace (workspace 4) under gnome2.6. Of course, it would be pretty wasteful to run gnome if that's all I was running but I like to have GUI apps on the other workspaces.

Anyway, the topic in #screen says, "someone document the hell out of...window title setting". As that's one of the things I've done I'll document some of the customizations that I've used here.

The screen man page is actually pretty helpful. All I did is follow it pretty much. The two lines I have in .screenrc that pertain to window naming are:

bind R screen -t '# |root: ' su
shelltitle '> |bash'

and then this in .bashrc (root's too if you want commands run as root to dynamically name the windows):

if [ "$TERM" == "screen" ]; then
PROMPT_COMMAND='echo -ne "\033k\033\134"'
fi

If I find out how to make the default title anything more than a simple string (PWD would be nice), I'll let you know.

Hardstatus looks like

hardstatus alwayslastline "%{= wk} %c:%s %{= KW}%11=%{+b}%2`%{-b}%20=%3`%39=%H:%? %1`%82=%4`%100="

Pretty straight forward really. Backticks (%{1-4}`) call other scripts, the rest of it is documented in the manual under STRING ESCAPES. One thing I will say is that when using backticks to return strings don't return multiple lines and never put a sleep in a backtick. For instance, if you use awk don't have multiple print statements. Concat the string into a variable and then print the variable at the end, e.g.

uptime=`uptime | awk -F , '{gsub (/ /, " ", $1); gsub (/ /, " ", $2); foo = substr($1,match($1,/up/)); if ($2 !~ /users/) foo = foo "," $2; print foo}'`

Caption:

caption splitonly "%?%F%{.kw}%:%{.wk}%3n %t%{= ww}%? %-Lw%?%F%{+b}%:%{= ww}%?%n%f* %t%{-}%+Lw%<"

This was a bit of a pain. You can't add a string escape to the focused window's caption but you can add one to those that don't have focus. %?%F focus! %: background. you can put %H here %?, basically. This is because of how %? works. So the workaround is to change the text colour to match the background. Pretty sloppy but it works.

* * *

desktop.jpg [384Kb]

Got a gmail account as soon as I got back online (who doesn't have one now?). It seems to be webmail done right. I'm not a huge fan of email though (s/n ratio is way too high for me) so meh. I wish they were still rare so I could swap invites for nudie pics of college cuties.

This discussion has been archived. No new comments can be posted.

.screenrc

Comments Filter:

Lisp Users: Due to the holiday next Monday, there will be no garbage collection.

Working...