Posts Tagged ‘hotkeys’

Zepto Znote 3215W with Debian Testing/lenny

Monday, January 28th, 2008

Zepto Znote 3215WAs my old Asus M2N laptop got older and older, and for some reason slower and slower, I decided to buy a new one. I ended up gettinng a Zepto Znote 3215W with a few customisations. There were several reason for this choice:

  • Zepto has very competive prices,
  • Zepto will sell laptops without an OS preinstalled – no involuntary Microsoft tax,
  • laptops can be customised as you want them,
  • and then this quote: “Works with Ubuntu Linux. 3215W is tested and will work together with Ubuntu Linux 7.10 beta, Out-of-the-box. For Wifi you will need to use the Intel Pro/Wireless 4965 netcard.”

The specs of mine are:

  • Intel Centrino “Santa Rosa” chipset
  • Intel Core2 Duo CPU T5450 @ 1.66GHz (*)
  • 2 Gb DDR2 800MHz RAM (*)
  • 120 Gb SATA harddisk 7200 rpm (*)
  • DVD-RW DL drive (*)
  • 15.4″ WXGA “Crystal Clear” display at 1280×800
  • Intel GMA X3100 graphics chipset
  • Intel Pro/Wireless 4965AGN wireless network adapter (*)
  • Broadcom NetLink BCM5906M network adapter
  • Broadcom internal USB bluetooth adapter (*)
  • Ricoh Firewire adapter
  • Ricoh SD/MMC card reader

The items marked with (*) are where I have asked for changes or additions to the default configuration.

It is a fairly large laptop, measuring 36×27×4cm and weighing 2.8kg which is OK for the kind of semi-stationary work I do currently.


Most parts of the laptop work immediately with little or no manual configuration on a Debian Testing install, but there are several parts that doesn’t. Most of these seem to have a solution on the way. Zepto states that the laptop is fully Ubunto 7.10 compatible, but not everything went that smooth with Debian.

An install of Debian Testing (lenny) with a Linux 2.6.23 kernel leaves these parts non-functional:

and these only partly functional:

  • X server sometimes fails to restore textmode correctly
  • Touchpad not recognised but it still usable
  • ACPI works only partially
  • Minor issues with sound and headphones

and these require an extra effort to get fully functional:

  • Compiz window manager
  • SD/MMC card reader
  • Keyboard hotkeys


Logitech Cordless Desktop LX700 with the Xorg X server

Tuesday, November 29th, 2005

This is an update to the item “Logitech Cordless Desktop LX700” after I switched from XFree86 to Xorg. I’m not sure where to cast the blame, though, since there have been many other changes, like an upgrade to Debian Sarge and a new Gnome.

Something changed, thats certain, because some keys died at various levels.

Logitech Cordless Desktop LX700

Saturday, June 4th, 2005


I was getting tired of my old keyboard and decided to buy a new on. The choice fell on a “Logitech Cordless Desktop LX700”, with a “Logitech Cordless Click! Plus” mouse included.

The keyboard has a gazillion extra keys, including a roller on the left side, doubling for the arrow keys on the right, and some mouse buttons on the keyboard. It also has a bunch of keys for controlling a media player, and for other applications.

Basic functionality is there and the keyboard works out of the box with Linux. The problem lies with all the extra keys.

Some of the extra keys are known to the Linux keyboard driver and to to XFree86, and they can be configured in Gnome or your window manager without any problems. In my case this happened for several of the media player keys and the Email key. All I had to do was select “Logitech Desktop Pro” as the keyboard type in the Gnome preferences.

Many of the extra keys did not work, however.

It took quite an effort to get everything to work, but in the end each and every key on the keyboard is usable under Linux.

Sawfish functions for hotkeys and panel launchers

Monday, August 30th, 2004

One of my laptops has a series of hotkeys that send ACPI events, so I made a script to handle these events, which I later extended to be usable from the desktop or the panel too.

The various applications have different needs, and I use them in different ways. I only have one mail reader open, and its always in the same workspace, while I have many browser windows open in different workspaces. Others, like my calendar application, are used more like dialogs, where I show and hide them in the current workspace. Many require a close interaction with my window manager.

The core of the script looks like this:

case "$1" in
	case "$3" in
	    00000030) aumix -v+5;;
	    00000031) aumix -v-5;;
	    00000032) mute;;

	    00000040) xmms --rew & ;;
	    00000041) xmms --fwd & ;;
	    00000043) xmms --stop & ;;
	    00000045) xmms --play-pause & ;;

	    00000050) launch_mailer;;
	    00000051) launch_browser;;
	    00000052) launch_xchat;;
	    00000053) launch_calendar ;;

	    0000005c) show_hide_desktop ;;

    weblogs)	launch_web_logs;;
    xchat)	launch_xchat;;
    calendar)	launch_calendar;;
    mail)	launch_mailer;;
    vmware)	launch_vmware;;

When called by acpid the invokation is like this:

hotkey hotkey ATKD 00000052

and from a Gnome launcher in the panel or on the desktop:

hotkey calendar

Sound keys

The cd player keys and the volume controls are all software controlled, so if I don’t do anything, they won’t work. I usually play music with xmms and use aumix or setmixer for volume control, so they are the programs used in my scripts.

The volume up/down and play/rew/fwd/stop commands above are all self explanatory. Its all the in the manuals for xmms and aumix. There is no mute function in aumix, so I had to invent one, and it had to restore the correct volume after muting. After some attempts I came up with this:

function mute () {
    case "$(aumix -vq)" in
	"vol 0, 0")
	    (grep '^vol:' ~/.aumixrc-mute 2>/dev/null || echo 'vol:100:100:P') |
	    aumix -f /dev/stdin -L >/dev/null
            aumix -f ~/.aumixrc-mute -S -v0

It’ll mute and restore the volume at alternating invocations, perfect for a mute button.

Hide and show all windows

I think the button is intended to turn the wifi trasmitter on and off, but I use it for the desktop. The code is this:

function show_hide_desktop () {
    exec sawfish-client -- << EOF
(if (showing-desktop-p)

Only one application instance open

For some applications I only want one instance open at a given time. It can be my mail reader, vmware, my irc client or any other applications where several instances can be confusing or harmful.

I use the window manager to decide what to do, for example for the mail client:

function launch_mailer () {
    exec sawfish-client -- << EOF
(let ((window (or (get-window-by-name-re "^Mutt")
		  (get-window-by-name-re " - Ximian Evolution$")
		  (get-window-by-name-re "Mozilla Thunderbird$"))))
  (if window
      (display-window window)
    (select-workspace (cdr (workspace-limits )))
    (start-process nil "mozilla-thunderbird")

This function will check for an open mail reader, and if found switch to that window (changing workspace if necessary), and if not found, it will move to the last workspace and launch Mozilla Thunderbird.

Dialog-type application

This is a bit more complicated. I want my calendar to always be around when I need it, but not get in the way when I don’t need it.

I do this by always keeping it in the current workspace, but iconified. This function does it all:

function launch_calendar () {
    exec sawfish-client -- << EOF
(let ((window (or (get-window-by-name "Mozilla Sunbird")
                  (get-window-by-name "Mozilla Calendar"))))
  (if window
      (if (and (window-in-workspace-p window current-workspace)
	       (not (window-iconified-p window))
	       (eq (window-visibility window) 'unobscured))
	  (iconify-window window)
	(move-window-to-workspace window (car (window-workspaces window)) current-workspace)
	(display-window window))
    (start-process nil "sunbird")

If the calendar application is already started, it will check if it is in the current workspace and fully visible. If it is it is iconified, otherwise it is moved into the current workspace, de-iconified and brought to the front. If the calendar is not running, it is started.

The overall effect of this is that alternately display and hide the calendar, regardless of where it was left the last time. One click opens the calendar, the next click closes it.

None of this is quite rocket science, but they are some of those little things that makes day to day work move a bit swifter.