Archive for the ‘gnu screen’ Category

Productivity Tip: Increase Integration in the Software You Use

August 8, 2008

One of the ways to make console apps more GNU screen-friendly is to set them up so they spawn other things within the same instance of screen.

I use snownews to read through rss feeds, and use elinks as my default browser (with snownews, in screen, and outside of screen). Where I’ve been slowed down a bit is while downloading podcasts I keep track of in snownews. Since I was launching elinks in the same terminal or terminal instance, I could either wait for a download to finish or open another instance of snownews.

I finally got around to setting up my browser in snownews so that instead of:

elinks %s

it’s now:

screen -t elinks elinks %s

The -t option is for the title (the first elinks) which will either appear on ctrl-a w or on your status bar if you run one permanently. The second will open elinks in that terminal instance (you can use any browser you want for this; graphical browsers will still open a screen window and open the graphical instance as well). And the %s is the signal for whichever file or page to open in the browser.

Now when I open a link in snownews, it opens in a distinct elinks instance so I can toggle back (ctrl-a a) to snownews while a podcast or another file downloads or whatever. I set up my screenrc to give me an alarm when there’s activity in any terminal instance in screen, so I can close a window when a file has finished downloading. My one instance and session of snownews isn’t interrupted by waiting for anything to download, and closing the window for an article takes me right back where I left off.

Other programs can be set up similarly if you primarily run them in screen. For example, you could edit your mc MIME/file associations so the same thing occurs when opening music files with a non-graphical program (which I do because the music pretty much sounds the same regardless of XMMS or mplayer or mpg321 without clogging as much RAM with some wild-skinned front end). Just follow the conventions for whichever program you’re using.

I’ve also mentioned vifm in this blog and noted it’s seamless integration into screen. While not as feature-packed as mc, it’s still very useful if you know vi commands and can make the associations between “vi-thinking” and file management. It makes working in screen even easier because the user can set it to open separate instances in screen with “:screen”. I mention vifm again because I don’t think I’ve written that it’s been updated since I wrote about using it in screen.

I know there are others who’ll recommend using desktop environments that share resources even better than the kinds of arrangements I use. As much as I like KDE, it’s not nimble enough for my tastes — at least not on my hardware. It’s made for those of you with faster hardware (and masochists who insist on eyecandy and integrated environments more like Windows whether their hardware is capable of it or not), not those of us bent on actually using computers to simplify our lives and get more stuff done.

screenrc, ratpoisonrc

June 23, 2008

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.

Bye dwm, Welcome Back ratpoison

June 9, 2008

I wrote back in April that I would try dwm at least a week. I gave it quite a big longer. The experiment is over. Here’s why I’m using ratpoison instead of dwm…

  1. more screen real estate
  2. simpler navigation
  3. no zombies
  4. reconfiguration doesn’t require recompile
  5. can split but not by default

There’s a lot I like about dwm. Ultimately, though, it doesn’t suit my tastes or needs.

If you notice, a lot of my screenshots show screen sessions (like the one above). I think screen is my most-used utility/”window manager” and that means I really don’t need a status bar — screen has its own if a user chooses to leave it on (I do for a few reasons: I usually have more than one app running in each session, I run sessions from multiple computers via ssh, etc.). I realize the status bar in dwm can include just about anything via pipe, but I noticed the hit on CPU use because of the sleep + command used. For some users that would be trivial. To me it wasn’t because I was left with the default version number in a corner plus virtual window/tag names across the screen. That left a little region for app information. Convenient? No, because it only shows what’s currently open — much like a window title bar. I finally started using lsw, another nice tool from suckless, to both list windows in console as well as pipe out to dmenu.

I think ratpoison handles all that better. I can list the windows with my escape (ctrl-z) and w. I can also use lsw in ratpoison. Like I said above, I know I can pipe it to dmenu — which I’m also using in ratpoison. I need to work on this more because it’s not working the way I want. For example, I can successfully switch to an application like opera but selecting any open window in opera (they each list separately) causes me to switch to opera with a new open tab. This is on the backburner for now.

Speaking of dmenu, I read through a lot of blogs and forums where users said they were using dmenu with ratpoison. Many of them talked of scripts to use dmenu in ratpoison. I don’t know what’s so difficult that requires a script. I have an entry for it in my .ratpoisonrc and it works just as well as in dwm (only I use ctrl-z-P to open it):
bind P exec $(dmenu_path | dmenu)

Here it is atop mc. I edited the colors in dmenu’s config.h so it stands out from the black background in a subtle way:

Easy enough. I may experiment with more such commands piped to dmenu so I can bind a list of console apps to open directly in aterm (which I compiled as my default terminal instead of xterm) rather than binding “aterm -e” for each of them.

Anyway, I was willing to give up the dwn status bar and get back another line or so in each window.

Another thing that didn’t suit me was the number of variables to navigate windows. I think the best solution to this kind of thing is the way ion handles it with tiled tag headers/title bars so navigation is fairly straightforward. You can see what you have in any given region even if it’s not what’s presently visible. In dwm, the title bar is what you see. You have to either list windows (lsw) or toggle with alt-j and alt-k to see if there’s anything else in that particular region.

I realize ratpoison is similar in that there’s nothing but escape-w to list windows. You can escape-n/p through blindly if you want. But there’s no sacrifice of screen space to do it — with dwm, you give up  several pixels of height across the top of the screen to list tags, current window in view, and either the dwm version or whatever you choose to pipe to it.

My last dwm config.h reduced my tags to two: local and remote. Then I figured out that even that simpler configuration was excessive and I only needed one. And that I didn’t need a status bar to show me what I was doing — if anything, I needed one that showed me what was “behind the veil” of what I’m currently working on rather than what I’m presently working on. I think I can distinguish the interface for vim from mc from vifm from firefox from sylpheed without 800×15 (for this monitor) pixels across the top to tell me. Use that space to tell me what else is open, what else is available, what I can’t see — like ion does — or don’t take up that much space. Even with jwm I can edit the configuration file(s) so I get exactly what I want, where I want, the way I want. Maybe I can edit the dwm config so I get a list of unseen open windows instead of current seen open window. But my use of dwm was already more and more like ratpoison except with different keybindings and recompile to reconfigure.

I set dwm up to run monocle mode by default, so it was more like ratpoison with each app window taking up the full screen rather than automatically splitting things up in each view. I don’t care much for split windows, especially since most of my monitors are 800×600. There are times when I appreciate such features but not by default. At least dwm makes changing that fairly easy. I think ratpoison does it better by leaving everything full size unless the user decides to split things up himself or herself. There was really little I was doing differently in dwm with respect to ratpoison. The only differences were dwm accessories like dmenu and lsw, each of which is agnostic when it comes to use in window managers. I’ve also used both in jwm and other window managers, binding it to similar keystrokes each time (like I wrote above, in ratpoison I chose to simply mix the ratpoison escape sequence with the dwm default of P).

I also noticed that every restart of dwm gave me zombies for dwm, xset (for my beep and font paths), and sometimes for xsetroot. Not exactly a problem, but I wondered what in the world was causing that. In contrast, I can kill ratpoison or kill X or use the ratpoison command :restart and no zombies.

Finally, reconfiguring dwm to change colors, keystrokes, etc., gets a little old. I finally stopped messing with that and installed xbindkeys, added another dmenu for my scripts to manage certain things, and so on. With ratpoison, I edit one file and restart.

One thing I have to say is ratpoison uses a bit more memory than dwm. The VSZ of dwm was 2300 while ratpoison’s is 2488; RSS for dwm was 928 to 1104 for ratpoison. Not drastic, but worth mentioning.

Both are fine window managers and neither is ideal for everyone. I just think the dwm status bar is a bit of useless frippery and simple changes shouldn’t require recompiling an app no matter how small it is in LOC or how simple it is to edit. So ratpoison suits my tastes and needs a little better.

Productivity Tip 2: Calendar Apps

June 4, 2008

I don’t use calendar apps because I’m punctual and attentive about things like scheduling. I use them because no matter how punctual and attentive I try to be about schedules, I’m really not. Without them, I’d do a worse job prioritizing events and let things conflict more often than not. At least that’s what I think.

I used to be a fan of Sunbird and Lightning from Mozilla. Sunbird is their standalone version and Lightning integrates into Thunderbird. These are fine if you have a fast processor and lots of RAM. They’re dreadfully slow if you don’t.

Instead, I’ve become a very big fan of calcurse. This is a three-pane console app that handles just about everything you need from a scheduling application. In the default main panel is the daily calendar. On the right side are two more panes. On top is a navigable monthly calendar which is used for navigating to the day that shows up in the main panel. Beneath the monthly calendar is a to do list.

By default, the navigable monthly window is active. It can be toggled with a tab or you can use a keybinding to set tasks in the other two panes — ctrl-a to add an event to a daily calender or ctrl-t to add to the to do list. Users of screen will see an immediate problem with using the default binding: ctrl-a is the preceding escape used in screen. So I use tab.

Setting events is very straightforward. The entry area is hinted so users can enter start and end times, events, priority (on to do entries), etc. Commands are also hinted in a fashion of pine/pico across the bottom part of the terminal.

Its power doesn’t end with keeping events straight. You can use multiple calendars with the -c filename flag (it will use its default if you don’t use -c). You can export your calendar to an ICS calendar file that anyone with just about any other mail application or web-based calendar can import (I have a cron job that does this every week and I use an alias to pipe it to a file as needed) by using the -x option and piping it to filename.ics — e.g.,
% calcurse -x > lucky13.ics

It can also be used to print out notes, the to do list, or any particular day’s events. See the documentation page on the calcurse link above for examples.

Okay, you say, but what about other programs like remind and wyrd?

Those are also certainly very nice. The reason I prefer calcurse is because it doesn’t have any unusual requirements (like ocaml), because it’s very easy to use (the hints are right there in front of you if you forget what you’re doing), and I think it’s every bit as flexible as anything else out there. If not more so.

And why is it better than Sunbird? It loads immediately. I can export a calendar in a fraction of a second even on an older computer. I can generate my to do list and either print it out in a terminal, pipe it to a file, or “:r! calcurse -t” (or -d) inside vim and include it in a note or report without having to do or open anything else.

Anything that helps you schedule your life shouldn’t take up an extraordinary amount of time. Not to compile, not to start, not to use, and not to quickly get information out of it. Of all the calendaring applications I’ve tried, calcurse lets me get things done most quickly.

My Low-End Set Up

June 4, 2008

I’m finding set ups that really work well for me and my low-end hardware. My present little piece of ancient computing nirvana is the following environment:

  • running gnu screen within X (kdrive from DSL)
  • using vifm by itself and within vim
  • elinks most of the time, Opera when I need graphics
  • snownews for rss
  • mplayer (no gui) to stream audio

This isn’t my first time to enjoy the combination of vifm and screen. What’s so special about it? By issuing the “:screen” command within vifm, it will open new “windows” in the current screen session. Click on a text file (or any file without an association in the configuration file) and it opens in vim or whichever editor you choose. Set up a MIME association and it opens the app in another screen window.

The “mplayer” tab was opened when I selected the highlighted PLS stream.

The best part of all of this: I was only using 53MB of RAM to run all the normal processes (default DSL 2.4.31 kernel, modules, basic services, sshd, etc.), X, dwm, screen, vifm, zsh, elinks (two tabs open including gmail), naim, and a high-definition audio stream.

mplayer is the pig, but it’s still consuming a lot less resources than XMMS does. I can trim it all down further by running my custom kernel but I need to reinstall it (packaged from last hard drive install).

The console apps I selected give me just about every feature I could need — except support for images and video (just haven’t gotten that far with it yet). I compiled elinks with bittorrent and ftp. I also downloaded spidermonkey to add javascript support, so I’ll have that when I recompile. Now I just need a better-developed console spreadsheet and I’m set. I’m not setting all this up for this particular computer. It’s for something I’m taking on vacation this summer; I’ll have more details shortly (and explanations for why it needs to use as little power as possible).

Even though it appears vifm is no longer being developed, it works very well if you’re used to vi/vim commands. It’s certainly not as feature-rich as midnight commander or other file managers. It does most ordinary file management jobs very well. It can launch executables or open them in vim (or your choice of editor). It can be set up with MIME types as noted above. It can sort files by all the usual variables like name, size, date, etc. It can even accept shell commands. About the only thing I don’t like about it is the default white border and panel dividing the two panes (which can be set to one pane as well), which I set to black. Unfortunately, it only has eight-color support. I may see what I can do to get 256 (I need to update my version of screen.uci in MyDSL for that, too).

I like the combination of vim, vifm, and screen so much I compiled it as one UCI for personal use in DSL. I’m also considering using those as the basis of the user interface for my next DSL remaster, which is on hold until I get a chance to play with the next major version of DSL (2.6-based “tiny core”) since that may serve my purposes even better than stripping X apps from the current base.

Playing in Console

April 22, 2008

I’m pretty happy I can switch back and forth between console and X now that I have my tty issues resolved with Vector. I decided to find tools to take console shots. I settled on fbdump aliased to pipe the dump through pnmtopng and output a time-stamped png.

This is a scaled shot of my gnu screen session with htop in the foreground.

I’ve set up every .screenrc I use with hostname so I know which computer I’m working on. Comes in handy and helps me keep things straight if I have screen sessions running on multiple computers — home server, work computer, work server, etc. — and shelled in on different ttys. Click on the image below for the 640xn full size version of the caption:

Notice how gentle the demands of console apps are in comparison to GTK1 and GTK2 apps in X (click for full scale):

By contrast, I’m running X and Firefox GTK1 now (one tab open to edit this post). I opened one instance of aterm to run htop. It’s showing 71 MB memory in use.

For what it’s worth, the memory use when I open htop after I boot up and wifi starts is 17 MB. I could probably get that down another MB or two by not starting certain modules I don’t need to start.

Here’s the caption line from my .screenrc:

caption always “%?%F%{-b yk}%:%{-b bb}%?%H %{-b rk}%?%C %{-b wk}| %?%F%{-b bk}%? %L=%-Lw%45>%{-b ck}%n%f* %t%{-}%+Lw%-0<“

Since seeing what Vector Light is/isn’t, I’m going to proceed with the lower resource slackbuild I’ve mentioned the last few days. I’ll post some more ideas in the coming days about the levels of build I think are possible (minimal without X, minimal with X and mix of console and GTK1 apps, and low resource GTK2).

Edit: Here’s a shot showing htop at six minutes uptime with only htop running.

Edited again: It’s not like an obsession or anything, but I got it down to 15 MB:

Note that htop doesn’t count cache (so free -mt actually reports that I’m using 80-something MB). It’s also relevant that to do this I blacklisted all the sound modules that normally would load; I don’t do audio on the laptop — my mp3 player battery lasts longer between charges and the player sounds a lot better.

How I Roll: sshfs

March 24, 2008

I’m not exactly a road warrior, but most of what I do is in the field. I’ve written in various forums that there are a few applications and utilities essential to me and “how I roll.” One of them is GNU screen. Another is SSH. These two allow me to work from the same session anywhere without ever stopping.

I’m also a huge fan of sshfs. This is a FUSE filesystem that allows a user to mount a remote home partition via SSH as though it were local.

Here’s a little tip if you’re working on a laptop in a situation where you have limited space on its hard drive, or if you’re in an area where there’s significant risk of losing your data through computer theft or some kind of disaster. It’s also cheaper than buying a new laptop hard drive.

Let me give an example. Let’s say you’re on your laptop at the university. There’s significant risk of theft of laptops and everything else. You need to work on your project but you want to insure you don’t lose all your effort in case your laptop “disappears,” if it gets dropped, whatever. You can lose an entire semester’s (or longer) work if something bad like that happens.

WIth sshfs, you can keep your work on your desktop (or server) computer at home. It doesn’t end up on your laptop’s hard drive, but you still have the easy and fast access as though it were because it uses the Unix idea of “everything as a file” in joining remote to local.

You would only need to run ssh on the computer at home so that you can access it remotely (and as securely or insecurely as you desire). On the laptop, you would run the fuse module and then enter the command:
% sshfs username@path.to.desktop.or.server: laptop.mountpoint/

So if your account name at home is “lucky” and you want to set a mount point (directory) on the laptop for “remote” it would look something like this:
% sshfs lucky@my.home.network: remote/

You’re asked to enter the password for user lucky and then that mounts the entire /home/lucky directory on the other computer to ~/remote on the laptop. Once you do that, you can transfer files back and forth as though it were all local — the same as any other files or filesystems mounted on your computer.

If you have a similar/compatible set of applications on both computers, you can also just get with it and use your remotely stored data files with your local applications. If you’re using Open Office’s calc or Gnumeric for your spreadsheets, you would just open whichever files from the remote computer on the local one. Then when you save, you’re saving remotely.

This minimizes the need to sync files between laptop, desktop, and/or server or keep up with multiple versions of the same data because you can use the same version universally. You can get by with less space on your remote/laptop hard drive if you have large files to work on. Just use your larger (cheaper) hard drive on your desktop/server for all your storage.

When you’re finished and want to unmount the remote system and terminate SSH, you enter:
% fusermount -u ~/remote/

Since it uses SSH, it’s more secure than a lot of other options including keeping data on tiny USB devices that can disappear even easier than laptops. And while there can be risk of theft of your desktop computer while you’re away, that risk is much lower if you use a bulky old (cheap) computer for such purposes. The more stuff you put in it to weigh it down (six combined floppy and optical drive slots don’t have to be filled with working — or even connected — drives), the less likely a thief will be interested in carrying it. Instead of adding another working computer (or broken floppy and Zip drives) to your local landfill, why not put it to good use?

It doesn’t need to be bleeding edge, you just need to be able to shell into it to access your safe data and have enough storage to make it worthwhile. It also doesn’t have to be big and heavy as described above — you could carry a “craptop” on campus and leave your good laptop in the safety of your home. Whatever you use can serve other duties as well if you put your mind to it.

And you can get by without ever touching your laptop hard drive (or needing one). Some Linux live CDs, including Damn Small Linux, come with FUSE and sshfs. Since DSL contains extensions like Open Office, Abiword, Gnumeric, etc., it would be quite easy to work remotely like this.

Both FUSE and sshfs are available with nearly all Linux distributions or should easily be added if not, as well as for FreeBSD and NetBSD (possibly other smaller ones, but not to my knowledge in OpenBSD). More FUSE fun soon.

Ratpoison, Screen, SSH

March 10, 2008

I’ve spent a lot of time this past week (and weekend) using the same screen session on my primary computer remotely from my laptop. This has allowed me to do things like compile without burning up my laptop (it gets VERY hot compiling), run the same session of naim, etc., and check back in as I can. No down time between travel, commuting, work, play, etc. I pick up everything right where it is no matter where I go.

I’d installed ratpoison on the laptop when I first installed Vector Linux. At that time, I was willing to give XFce a fair shot against window managers with lower system requirements (not fluxbox, more like jwm). I liked it, but it wasn’t as lean as I thought it should be. Then I installed KDE for a bit. I really like having a fully integrated system, but my laptop isn’t really up to running that.

So I’ve removed both XFce and KDE. I’ve been using JWM with a lot of my anti-WIMP mods from Damn Small Linux as my primary window manager. I’ve been using ratpoison more often again lately.

Not just on my laptop — I went ahead and installed it on desktop, too. I installed ratpoison on this computer because I noticed my USB mouse kept locking up and dmesg informs me that Linux can’t enable port 2 and maybe the USB cable is bad. Yep. After 10 years of abuse, it probably is. Once again, the mouse is unplugged and I’ve set things up so I can live without it (but I did plug it in so I can scroll while I edit this online).

I removed 9menu, which installs with ratpoison via Debian testing, and installed ratmenu as well as xbindkeys. I would’ve compiled xbindkeys on my own if I’d noticed the Debian version requires libguile-ltdl-1, libqthreads-12, and guile-1.6-libs — 2.654 MB(!!!). Ouch. I might go ahead and do that but I have this thing down to under 1.5 GB of disk use now.

What’s not to love about that?! It’s just vim with my ratmenu running in screen. I have a dark-ish grey (grey33) background and default grey text (good old size 10 fixed font!) in aterm. That’s the same screen session that’s been running for over a week, detached and re-attached probably 200 times locally and remotely.

I’m not anti-WIMP. I know there are people who carp on icons and menus and say they get in the way. Do they? Or are they really any different from shell wrappers and aliases? I don’t think they are. I think of that when I edit menus and aliases and write wrapper scripts.

Let me give an example. You probably can’t read the second to the last line clearly in the menu: it says “screen-scaled.” I wanted the ability to produce a scaled screenshot on the fly. So I appended an ImageMagick import line with convert to produce a 400×300 shot suitable for posting on blogs. I write the command(s) once either way whether it’s a wrapper script or a menu item or an alias. Let’s say I alias it as “scaledshot.” When I type sc-TAB, I’d get 28 possibilities for autocompletion. Add the l-TAB, four possibilities. So I’m already at five keystrokes and in need of another e-TAB — seven strokes. I know I can limit that with zsh by TABbing until I find the right one. That still would put me at six anyway.

How much of a barrier is my menu? Ctrl-z-y (I rebound my escape to z) give me a menu. Two up arrows take me backward to that line. Return. Done. Five strokes. Too many? I can bind that to shift-print (print is taken up for the full shot) or something else. If I were so inclined, I could bind it to an icon in another window manager and with one short motion and one click I’d have my stupid 400×300 screenshot to show the world how boring my computers are most of the time.

Anyway, I’m not getting too carried away with filling in the menu. Most stuff will be console anyway and run in screen. The point is, there are plenty of ways to do things. Right now, this is mine. At least til I go buy a new mouse.

Xfce Terminal and GNU screen

January 21, 2008

I’m currently using Xfce 4.4.2 on my laptop. I like it a lot. I also like using screen. I was getting frustrated when using screen in the Xfce Terminal because I couldn’t use backspace in screen but I could otherwise in Terminal.

The solution: open edit-preferences-advanced. Change the “backspace key” from Auto-detect to Control-h.