25 09 | 2011

Increase your productivity with two spaces

Written by Tanguy

Classified in : Homepage, Debian, Command line

Shell prompts are often designed to provide a reminder of useful context information such user name, host and current directory:

PS1="\u@\h:\w\$"
tanguy@muscat:~/public_html$

Such a prompt is sufficient to serve its original purpose, but it can be enhances in at least one useful way. Sometimes you have to copy the path of the current directory: with this prompt, it means selecting it by precisely dragging the mouse over it. Well, by adding spaces around the current directory you can become able to select it with a simple double click:

PS1="\u@\h: \w \$"
tanguy@muscat: ~/public_html $

Indeed, with such a prompt, you can now roughly point to the path, double click, and let your terminal emulator's word detection feature select the whole path for you. This simple modification may save you several tenths of seconds!

02 09 | 2011

rxvt-unicode: generate key symbols

Written by Tanguy

Classified in : Homepage, Debian, Command line

rxvt-unicode is a terminal emulator with some interesting features. Here is one of them I find most amazing and elegant: it can generate the symbol characters corresponding to keyboard keys.

It works by pressing and releasing ⎈ + ⇧ (⎈ is the symbol for the Control key, and ⇧ is Shift, of course), then the key which symbol you want to get.

For instance, to get the Caps lock symbol, you type ⎈ + ⇧, ⇬, which gives you the following symbol: ⇬. Here are some other nice examples: ↵ (Return) ⇮ (AltGr aka Level3 Shift) ⌫ (BackSpace) ⎀ (Insert) ⌦ (Delete) ⇱ (Home) ⇲ (End) ⇞ (Prior) ⇟ (Next).

Beware that this will not cancel the effect of {Caps, Num} lock keys: you will get their symbols but also enter the corresponding mode.

Archives