September 2005 Archives

Strange matter

| No Comments

accretion disk Random thing that made me smile:

I need myself some strange matter. DON’T ASK WHAT IT’S FOR! You will know soon enough. My asking price is $1,000,000,000,000 for five cubic centimeters; make me an offer.

From wikipedia “Quark star” article discussion page

Selecting words in xterm

| 3 Comments

xterm

I’ve been using this feature for years now, and it is surprizing that not many xterm users are aware of it. When one double-clicks in xterm, a “word” is selected. By default, one gets selection like this: http://blog.tobez.org/, if one double-clicks on an e there. This is OK for some usage patterns, but suboptimal for many others. Fortunately, it is possible to override xterm’s notion of what to select, by using a charClass resource. I have the following in my .Xdefaults file: XTerm*charClass: 33:48,36-38:48,43-47:48,58:48,61:48,63-64:48,126:48 Admittedly, this is a bit cryptic. That’s probably why this feature is so underused. So please, go and read the “CHARACTER CLASSES” section in the xterm manual page, and tinker until satisfied. Oh and by the way, this is a sole single thing which made me switch from rxvt and its various clones back to xterm.

Reconciling xterm and firefox clipboards

| 5 Comments

firefox

Firefox and many other X applications that support clipboard operations (^X/^C/^V) do not always play well with some other X applications (most notably, xterm). This is because there are several selection types in X. The “select with the mouse and it is there for you” is called PRIMARY selection. The “^C to copy, ^V to paste” one is called, not surprizingly, CLIPBOARD. There can be more, but those two are the ones used the most. The problem is that sometimes when you create a selection in an xterm, you really mean to paste it in an application that pastes from another selection type, and the other way around. Some would argue that having multiple selection types (just names, really) is a fact of life. Some would probably try to persuade you that this distinction is somehow useful. Me, I would just say that it is annoying. So, before trying to hack something up, I googled a bit, and found this page. David Simmons presents a couple of xterm patches, one of which does exactly what I want, making any xterm selection to use both PRIMARY and CLIPBOARD buffers. His patch requires recompiling xterm, although he mentions that the same effect can be achieved with X resources manipulation. David left that part as an exercise to the reader. For the reference, here is the solution. Put the following into your ~/.Xdefaults file: XTerm.vt100.translations: #override\n\   Shift <KeyPress> Select:select-cursor-start() select-cursor-end(PRIMARY, CLIPBOARD, CUTBUFFER0) \n\   Shift <KeyPress> Insert:insert-selection(PRIMARY, CLIPBOARD, CUTBUFFER0) \n\   ~Ctrl ~Meta <Btn2Up>:insert-selection(PRIMARY, CLIPBOARD, CUTBUFFER0) \n\   <BtnUp>:select-end(PRIMARY, CLIPBOARD, CUTBUFFER0) \n\ Reload your resources with xrdb, or restart your X session. Enjoy.

About this Archive

This page is an archive of entries from September 2005 listed from newest to oldest.

August 2005 is the previous archive.

October 2005 is the next archive.

Find recent content on the main index or look in the archives to find all content.