|
|
Subscribe / Log in / New account

twm

twm

Posted Jan 28, 2007 17:27 UTC (Sun) by sanjoy (guest, #5026)
In reply to: Metisse: you though you knew what 3D was... by pflugstad
Parent article: Metisse: you thought you knew what 3D was...

twm has been my window manager for most of the 22 years that I've been using X10/X11 (I used uwm before twm came out); my .twmrc grows maybe logarithmically with time as I learn new tricks.

twm has focus-follows-mouse and autoraise. I don't use autoraise because I often want to look at or type into a partially obscured window without its coming to the fore. I don't use multiple desktops, and vanilla twm doesn't have them anyway, but the twm variant ctwm does have them.

Instead, in the .twmrc I bind keyboard shortcuts so that I can switch to and from my most used windows. My favorite bindings are:

"F1" = : all : f.raiselower
"F2" = : all : f.iconify
"F3" = : all : f.exec "xrdb .Xdefaults"
"F4" = : all : f.refresh
"F5" = : all : f.restart
"F7" = : all : f.exec "rxvt -n skye -T skye -e ssh workmachine &"
"F8" = : all : f.exec "rxvt &"
"F9" = : all : f.warpto "emacs@"
"F9" = s : all : f.warpto "skye"
"F9" = c : all : f.warpto "Xpdf: notes/notes.pdf"
"F10" = : all : f.warpto "root"
"F10" = s : all : f.exec "rxvt -n root -T root -e su &"
"F11" = : all : f.warpto "lynx"
"F11" = s : all : f.warpto "galeon"
"F11" = c : all : f.exec "galeon -w http://www.google.com &"
"F11" = m : all : f.exec "firefox -new-window &"
"F12" =   : all : f.warpto "xclock"

My most-used shortcut is F9, which takes me to my emacs, which is probably my de facto window manager. The current one has 475 buffers, including programs, directories, documents, and compilation buffers. I switch between buffers using the built-in keyboard shortcut C-x b. Emacs mostly guesses the right default for the buffer to which I want to switch.

After F9 in popularity comes shift-F9, which brings up the window with the ssh connection to my work desktop machine (where I read email, in emacs using its mh interface).

I bind control-F9 to bring up whatever large document I'm working on at the moment. Right now it's textbook chapters for a course, so it brings back its xpdf window. When I want to change that binding, I edit the .twmrc and restart twm with F5. Probably I should instead use xpdf's remote-control options, naming the session currentdoc or something like that, and just leave control-F9 bound to xpdf -raise -remote currentdoc -reload. Then no need to restart twm, which uniconifies all my windows as a silly side effect.

I read most webpages in lynx, and F11 takes me to its window. I use its history cache ('V' from the keyboard) as another sort of window manager, one also easy to navigate with the keyboard. It has all the sites that I've been to in this X login, which usually means "between the laptop hanging on S3 suspend/resume", which happens maybe once a month. The current lynx has 400+ pages in its history, and they are automatically saved for offline viewing by the wwwoffle proxy cache.

For pages that lynx doesn't handle well, like LWN's comments with the nesting, I make a fresh galeon window with control-F11, a fresh firefox window with alt-F11, or just go to an previous galeon window with shift-F11 and make a new tab with there with control-T. I use lynx or galeon if a webserver doesn't get confused by the wwwoffle proxy cache on my laptop, and I use firefox for other sites.

To go to uniconified windows with no shortcut, I cycle among them with F1. Windows that I don't want to think about for a while get the F2 (iconify) treatment, and they disappear rather than cluttering the desktop, thanks to the line

NoIconManagers
in the .twmrc. The list of all windows, iconified and uniconified, I get by clicking the right mouse button (on the root window), due to this .twmrc line:
Button3 = : root : f.menu "TwmWindows"

I have lots of other bindings to minimize mouse use, but the preceding ones are the most useful ones that I've found, and maybe other rat-phobics can benefit from them.


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds