This blog is now officially archived (no new posts). I have moved to a new home at thirld.com/blog.
Thanks to the wonderful folks at wordpress.com, I am hoping that this site will be around for a long time.
This blog is now officially archived (no new posts). I have moved to a new home at thirld.com/blog.
Thanks to the wonderful folks at wordpress.com, I am hoping that this site will be around for a long time.
You probably know about less: it is a standard tool that allows scrolling up and down in documents that do not fit on a single screen. Less has a very handy feature, which can be turned on by invoking it with the -i
flag. This causes less to ignore case when searching. For example, ‘udf’ will find ‘udf’, ‘UDF’, ‘UdF’, and any other combination of upper-case and lower-case. If you’re used to searching in a web browser, this is probably what you want. But less is even more clever than that. If your search pattern contains upper-case letters, the ignore-case feature will be disabled. So if you’re looking for ‘QXml’, you will not be bothered by matches for the lower-case ‘qxml’. (This is equivalent to ignorecase + smartcase in vim.)
So how do we take this useful feature and make it permanent, so that we don’t have to remember to type less -i
every time? We could create an alias less='less -i'
. But there are tools (such as git-log) that invoke less on their own, and they will not know about the ignore-case option. It would be better if we could tell less that we always want that feature on, regardless of startup flags. This article will teach you how to do that.
If you need remote access to a computer whose IP changes dynamically, ddclient may be the tool for you. Check out this previous article for how to set up ddclient using a free service like DynDNS. Once set up, you will be able to connect to your box using a pretty name like mybox123.dyndns.org, rather than having to keep track of the changing IP. I should mention that there are many other free DNS services besides dyndns.com, and that many home routers can take care of Dynamic DNS for you (i.e., you can set it up on the router, rather than on your computer).
Today, however, we have a more complicated task. This article will teach you how to:
Thinkpad keyboards are the best laptop keyboards I’ve seen. The function keys are placed in groups of four, with gaps, like on a full-size keyboard. The arrow keys are located lower than the rest of the keys, for easy tactile identification. And best of all, the Insert, Delete, Home, End, and Page Up/Down keys are grouped in the familiar 2×3 box pattern one would expect to see on a desktop keyboard.
The only thing I’m missing is a right Windows key (technically a Super key). A lot of handy Amarok shortcuts use the Win key, such as Win+O for displaying the OSD, or Win+P for firing up the playlist. I’ve also set Win+Plus and Win+Minus to change the volume. With only a left Win key, all of the above-mentioned shortcuts require two hands. So what can I do?
I can remap the “back” key (XF86Back
) located above the left arrow key to act as a right Win key. (The back key itself is not that useful — in most sensible applications, one can use Backspace for that purpose.)
First, I open up xev
and press the key to find its keycode: 166
. Then I use xmodmap
to test the changes live:
xmodmap -e “keycode 166 = Super_R”
Finally, I save the setting in my ~/.Xmodmap
:
keycode 166 = Super_R
Mission accomplished.