воскресенье, 11 ноября 2012 г.

How to set EMACS fonts rendering the same as the other KDE applications

Here's how to fix the default too wide and too "round" fonts rendered in EMACS under KDE (and maybe other DE, too).

Write this into the ~/.Xdefault file:

Xft.antialias: 1
Xft.hinting: 1
Xft.hintstyle: hintfull
Xft.rgba: rgb

After that, run the following:

$ xrdb -merge ~/.Xdefaults

And after that EMACS will really get the same-looking fonts as the other system around it. Thank you Atragor for your answer at archlinux.org

Über prompt string for modern commandline

Okay. Today's XXI century already. You have colored commandlines everywhere and you have basically single-user *nix OSes. Now it's time to shift from default commandline prompt strings to something more useful (and fancy, of course).

This is how my prompt looks like now:

This is four-line prompt.

  1. Empty line as a separator.
  2. Clean cut with command history number and 72 dashes.
  3. User and host names, current time, jobs count and current directory.
  4. Emoticon showing the result of last command and the traditional $ symbol (which bears no meaning here, really). If we currently are in the Git repo, then between this tokens the current branch name is being shown in square brackets.

Emoticon at the last line behaves like this:

Big thanks to Make Tech Easier for inspiration.

Here how it was done...