Archive for November, 2006

dell inspiron 8200 media keys and freebsd

November 29, 2006

To configure the media keys on my Dell Inspiron 8200 to work with Amarok takes three steps:

  1. Per default the media keys are not linked to any X keysyms. Put this in ~/.Xmodmap:

    keycode 176 = XF86AudioRaiseVolume
    keycode 174 = XF86AudioLowerVolume
    keycode 129 = XF86AudioPlay
    keycode 130 = XF86AudioStop
    keycode 131 = XF86AudioPrev
    keycode 132 = XF86AudioNext

  2. Map the keys to the relevant commands – I’m using amarok. Put this in ~/.xbindkeysrc:

    “mixer vol +5″
    XF86AudioRaiseVolume
    “mixer vol -5″
    XF86AudioLowerVolume
    “amarok –play-pause”
    XF86AudioPlay
    “amarok –stop”
    XF86AudioStop
    “amarok –previous”
    XF86AudioPrev
    “amarok –next”
    XF86AudioNext

  3. Now run xmodmap ~/.Xmodmap && xbindkeys. Put theese commands in your ~/.xinitrc as well.

amarok now playing in dwm statusbar

November 26, 2006

Put this in .xinitrc:

while true
do
    echo `dcop amarok player nowPlaying` "|" `date "+%H:%M"`
    sleep 5
done | dwm

show week numbers on google calendar

November 21, 2006

For all the time I have been using Google Calendar I have been somewhat bothered by the fact, that it does not have the ability to show week numbers, which we use a lot in Denmark. The answer is simple – ReCover. Simply add their Google Calendar for weeks starting on mondays.

mouseless (and vim’ish) firefox

November 11, 2006

Today I will bring vim to your Firefox, enabling you to use h/j/k/l instead of the arrow keys for moving around at webpages.

  1. Install the keyconfig extension, which gives you the possibilities of changing the standard Firefox-shortcuts.
  2. Install the “functions for keyconfig” extension, which enables you to use keyconfig to configure scrolling.
  3. Go to Tools -> Keyconfig and find the options named f4kc_ScrollLeft, f4kc_ScrollLineDown, f4kc_ScrollLineUp and f4kc_ScrollRight, and set the shortcuts to h, j, k and l – respectively

Restart Firefox and you can enjoy the freedom of surfing the vim way.

simple

November 10, 2006

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.

Antoine de Saint-Exupéry

vim and ruby

November 9, 2006

The standard Ruby-stuff that comes with vim is far from perfect. Better results can be reached using the files from the Vim-Ruby Project. Assuming you already have Gems installed you can easily install them:

gem install vim-ruby --remote
vim-ruby-install.rb

And for extended Rails-support take a look at this page: How To Use Vim With Rails

dynamic window manager

November 8, 2006

For a long time PapuaWM – an evilwm clone – has been my favourite window manager: minimalistic and a high level of keyboard control. Unfortunately it seems like development has ceased. So when i replaced Windows XP with FreeBSD on my laptop, I found a new window manager: dwm – a managing window manager, that manages your windows in a master and stacking area – letting you focus on doing whatever you are doing, and not wasting time arranging your windows. I really enjoy it!

Link: dynamic window manager