08.03.2009 21:34
Zenburn color scheme
I always work in a dark room, and after 16 hours of looking at your
screen a headache is inevitable. Trying to counter that a few years
ago I found a good color scheme for Emacs, called humvee
written by dto, which
these days turned into something a bit different (a
cross-platform graphical roguelike engine). Situation improved, but
when I saw Zenburn last year
on a screenshot I instantly knew it was right for me. It started as a
Vim color scheme, and people wrote new themes for a few other apps
(Emacs included), but from my earlier experience with humvee I knew I
had to color everything to really benefit from its low-contrast
scheme.
At about the same
time I
found the awesome window manager and at first I wrote a Zenburn
theme for it. Followed by a theme
for (Al)Pine MUA, and
then by
many
other themes and tweaks. Other people did the same so today we
have Zenburn for a good number of applications, allowing us to
stay in the zone no matter what we do. However there is only
one problematic field left, and that is web browsing, switching to my
Firefox tag sometimes almost blinds me. One way to deal with it is to
force custom user styles, but that breaks a good number of pages and I
don't like it.
Writing all these new themes and drawing icons felt kind of artistic,
that combined with the fact that my awesome rc.lua is code, and 800
lines of it, made me release it under a CC license. In case you were
wondering why I did.
21.02.2009 04:26
Personal backup solution
I have at least 4 machines at home that are operational at any given
time. Personal workstations, a firewall/router and a VDR/file server
box. The latter has the most disk space, holds nothing of importance
in it self and is perfect for storing backups. Some years ago I
deleted my ~/code directory. Nothing that important, but it
contained everything I wrote in the last 2 years. All that time became
worthless in a second. Eventually I reconstructed most of it
from scraps I had on other machines, but it was clear I need a solid
backup strategy for more then just a few things I considered important
by that point.
First file in my new ~/code directory became
pybackup.py, a simple script that would tar some files,
delete old snapshots and so on. As years passed I needed to backup
more and more data, and pybackup.py didn't cut it any more. I
was well aware of Amanda, Bacula, rsnapshot... and the
rest. But I wanted something extremely simple yet more
versatile then the previous solution.
I remembered reading a nice
article by Mike Rubel about implementing rotating backup snapshots
with rsync. Many people already took a crack at it, and that
page lists many of those implementations, but after checking all of
them not one was just right for me. Some were close though and gave me
a few pointers for my own
implementation. rybackup runs from a cronjob a few times
a day and backups all my machines to the file server over
NFS. The beauty of it is that I have multiple levels of
backups that are as big(small) as just one full snapshot + changes
between them. It's achieved using hard-links, while rsync
automatically un-links files that have changed. This solution also has
other advantages; rsync transfers only changes between files, offers
compression, encryption and so on. Finally let's see a directory tree
after a few months of rotating snapshots:
2008-03-14 16:04 daily.0/ 2008-03-14 12:03 daily.1/ 2008-03-13 08:05 daily.2/ 2008-03-17 00:04 hourly.0/ 2008-03-16 20:04 hourly.1/ 2008-03-16 00:04 hourly.2/ 2008-03-15 04:03 hourly.3/ 2008-02-10 16:04 monthly.0/ 2008-01-15 16:02 monthly.1/ 2008-03-11 00:04 weekly.0/ 2008-03-04 00:04 weekly.1/ $ du -hs ; du -hs hourly.0 1.5G . 778M hourly.0
01.02.2009 23:45
Awesome window manager
FVWM was my window manager of
choice for a long time. It's better described as a scripting language
for writing your own window
manager. The setup
I
used imitated
the look of QNX
Photon. On my laptop (a 12 inch
screen Presario
1247) on the other hand I used Ion, a tiling window
manager, because every inch of the screen mattered. The philosophy
behind tiling window managers is best described
by Ion's
manifesto.
Last year my main workstation was replaced
by a laptop, and I found Awesome window manager. Which
quickly became my new window manager of choice. It's infamous for
changing the configuration file format, and at that time it
used Confuse. But now, with v3, awesome switched to Lua,
which basically means that you code
your own environment, making it much more powerful. Basic
principles are that the window in which you are working always has
focus and always gets most screen space and that everything is
done with the keyboard. It's also worth mentioning that awesome is so
far the only wm using XCB
and that it's extremely good in managing multiple displays.
To note just a few specifics from my setup; all my widgets
use wicked
for registering with
awesome, Zenburn
colors everywhere for maximum viewing comfort, no taskbar or a
menu because, again, everything is done with the keyboard, many custom
prompts (Dictionary, Calculator, SSH, Manual pages...), Ion's
scratchpad imitation, suspending and resuming apps (think Firefox)
when running on battery... A lot of people started hacking on awesome
using it, and if you are searching for ways to boost your productivity
I invite you to try awesome, and use my rc.lua.
24.01.2009 13:21
Emacs org-mode
A few years ago I found it harder and harder to keep track of all my
responsibilities so I decided to try the Todo.txt method of GTD. It
wasn't bad, but not long after I came across a great tutorial
describing basic functions of Emacs
org-mode. Today all my tasks and projects are managed by org-mode,
since it's much more then just a tool to tick of your TODO items. One
of the most useful functions for me is the clocking function,
that keeps track of time I spent on a particular project. It also has
great integration with the rest of the environment; it can link to any
kind of document, e-mail or Usenet article and export to many
different formats. It has a simple and effective plain text system and
you can learn to use it in a few minutes, for any other advanced
functionality you can consult the extensive org manual.
Similar to org-mode is the Remember Mode,
it's much simpler, and some maybe already use it for taking notes. I
want to mention that org-mode has great integration with
remember. Before I connected the two I already had a general
notes.org file where I stored anything that was not that
important to go in one of the main files... and it was rather big by
the time I decided to use remember. So, this is how I configured it so
that any new note gets placed under the right headline:
;; Included in org-mode section of my .emacs (require 'remember) (org-remember-insinuate) ;; Notes file (setq org-default-notes-file (concat org-directory "/notes.org")) ;; Notes templates (setq org-remember-templates '(("Note" ?n "* NOTE %?\n %i\n %a" "~/.org/notes.org" "Notes") ("Download" ?d "* DL %?\n %i\n %a" "~/.org/notes.org" "Download") ("Login" ?l "* LOGIN %?\n %i\n %a" "~/.org/notes.org" "Logins") ("Music" ?m "* MUSIC %?\n %i\n %a" "~/.org/notes.org" "Music") ("Idea" ?i "* %^{Title}\n %i\n %a" "~/.org/notes.org" "Brainstorm")))Hitting "
C-x r
" prompts me to describe a note I'm
entering, and eventually places it in the correct section. It's also
very flexible, if you had anything in your selection it will
automatically be included, and if it was invoked while editing a file
it will generate a link to that file or section of the file.
11.05.2008 23:42
Journal
I developed an interest in UNIX operating systems some 10 years ago, and today most of my time spent with computers revolves around that. These days I work, play, tinker and code mostly on GNU/Linux. For years I participated in and contributed to various on-line communities; forums, IRC rooms, Usenet groups and in private conversations, all my ideas and thoughts scattered around and of no particular use to anyone short after they were written. This journal is an effort to create a central place for all my writings.