posted by Rahul Gaitonde on Thu 22nd Jul 2004 18:23 UTC

"IceWM, Page 4/6"

Here's a listing of my menu file, and the menu it produces:

prog Firefox firefox /home/rahul/local/firefox/firefox
prog Thunderbird thunderbird /home/rahul/local/thunderbird/thunderbird
prog Opera opera opera
prog Mozilla mozilla /home/rahul/local/mozilla/mozilla
prog FTP gftp /home/rahul/local/gftp/bin/gftp
prog Gaim gaim gaim
prog GVim vim gvim
prog Nedit nedit nedit
prog XMMS xmms xmms
prog XCalc xcalc xcalc
menu "More Progs"	folder {
	prog " Writer" kword oowriter
	prog "Gimp 2.0" gimp gimp-2.0
	prog Konqueror kfm kfmclient openProfile filemanagement
	prog GKrellm gkrellm gkrellm
	prog Dillo app dillo
	prog K3B k3b k3b
prog MPlayer mplayer gmplayer
menu "Configs"	folder {
	prog Preferences app gvim /home/rahul/.icewm/preferences
	prog Toolbar app gvim /home/rahul/.icewm/toolbar
	prog Menu app gvim /home/rahul/.icewm/menu
	prog Keys app gvim /home/rahul/.icewm/keys
	prog "Win Options" app gvim /home/rahul/.icewm/winoptions
	prog "bashrc" app gvim /home/rahul/.bashrc
	prog "bash_profile" app gvim /home/rahul/.bash_profile
	prog "xbindkeys" app gvim /home/rahul/.xbindkeysrc
	prog "Xclients" app gvim /home/rahul/.Xclients
menu "System"	folder {
	prog "Logout" app killall icewm-session
	prog "Halt" app halt -p
	prog "Reboot" app reboot

  • keys (~/.icewm/keys)

    IceWM's got excellent support for keyboard shortcuts. The IceWM manual goes so far as to say you can use IceWM without a mouse. Indeed, you can control all aspects of the window manager - minimising/maximising/moving, workspace navigation, and so on - with keystrokes (this is done via the preferences file). In addition, IceWM includes a configuration file that you can use to launch arbitrary applications using arbitrary keyboard shortcuts. This is the 'keys' file. Its syntax is exceedingly simple:

    key Keystroke+Combination executable -with -options

    And here's my keyfile listing:

    # Rahul Gaitonde's IceWM keys file.
    key "F15" xterm -bg black -fg white -font 7x14 -geometry 120x40
    key "Ctrl+Alt+f" /home/rahul/local/firefox/firefox
    key "Ctrl+Alt+t" /home/rahul/local/thunderbird/thunderbird
    key "F16" killall -QUIT icewm-session
    key "Ctrl+KP_Divide" aumix -v -5	# lower volume
    key "Ctrl+KP_Multiply" aumix -v +5	# raise volume
    key "Ctrl+KP_Subtract" aumix -v 0	# mute

    Obviously, pressing the Control key, Alt key and 'f' simultaneously, would launch Mozilla Firefox. That's fine, but what the hell is F15? or F16? No, dear reader, I have not managed to get hold of a very complex keyboard with numerous additional keys; I've simply mapped my two Windows "start menu" keys and the other "right-click" key to F13, F14 and F15, from left to right. In addition, my keyboard has four smaller keys at the top right hand side, labelled "Turbo", "Power", "Sleep" and "Wakeup", 3 of whose keycodes can be picked up by xev. They've been mapped to F16, F17 and F18, left to right. This mapping's been done via xmodmap. Use "man xmodmap" for more information on this tool.

    Anyways, as you can see, pressing the "right-click" button, now F15, launches an xterm. This, I've discovered, is an even faster way of launching your favourite terminal emulator than, say, Ctrl+t or similar.

    The last 3 lines are a huge convenience - adjusting the volume, no matter what application has current keyboard focus. I use the OSS sound drivers, so my volume is adjusted using aumix. If you're using ALSA, use alsamixer instead. Experiment on your own; I've never tried. ALSA always gives me slightly inferior sound quality - and I can't take that - I love my music and I've spent a lot of money on my speaker system! So I increase the volume with the control key and the '*' key on the numeric keypad (hence the 'KP_' in the key name). To find the name for a key, look carefully at the output of xev; the "keycode" section gives the scan code for the key.

  • toolbar (~/.icewm/toolbar)

    The toolbar is the area just to the left of the start button. It exists to allow one-click access to the most heavily used applications. I've come to the conclusion that most users will use either the keys file or the toolbar file. Those that prefer the mouse will pack their toolbar with apps; those whose fingers are stuck to their keyboards, will prefer to launch their apps via the keyboard. I'm part of the latter category, so I don't even use a toolbar.

    The syntax of the toolbar exactly the same as the one for the menu file, but of course, no submenus!

    Here's a screenshot of an ad-hoc toolbar I made:

    Table of contents
    1. "IceWM, Page 1/6"
    2. "IceWM, Page 2/6"
    3. "IceWM, Page 3/6"
    4. "IceWM, Page 4/6"
    5. "IceWM, Page 5/6"
    6. "IceWM, Page 6/6"
  • e p (0)    68 Comment(s)

    Technology White Papers

    See More