ICEWM: 2.- Manual configuration



ICEWM manual configuration


ICEWM configuration can be achieved by two main means. On one hand we can simply edit the text configuration files that ICEWM can be configurated through, and on the other we can make use of the different configuration tools that some ICEWM users have programmed to make this task easier under X11.



We'll begin talking about manual configuration, for it's very simple and most of the times it won't take a config tool to make changes in the simple config files that ICEWM uses.

All the config files are placed in the same directory (.icewm) in our HOME. Most usual files and directories inside $HOME/.icewm are:

  menu               -> Unfoldable menu file configuration.
  preferences        -> General ICEWM configuration.
  toolbar            -> Taskbar applications.
  winoptions         -> Options for program's windows.
  keys               -> Key shortcuts to launch applications.
  icons/             -> Directory to hold ICEWM icons.
  themes/            -> Directory to hold new themes.
  wallpapers/        -> Directorio to hold wallpapers.

We can create the .icewm directory by hand and create the config files from scratch, or (more recommended) create the directory and copy the sample config files that come for default with ICEWM (in /usr/lib/X11/icewm/ or /usr/X11R6/lib/X11/icewm/, depending on our linux distribution) to our directory, so we can count on some templates or default files:

  cd
  mkdir .icewm
  cd .icewm
  cp /usr/lib/X11/icewm/* -R .

Like this we can simply edit and modify the existing files. Later we'll see how each of these files works and in which different ways they can be modified. It's a remarkable fact that we don't need to restart the X server everytime we make a change in the configuration. All we need is to go to the ICEWM main menu and select LogOut -> Restart ICEWM for the changes to take place. We can also press CTRL+ALT+SUPR (this doesn't reboot the box but brings up a special ICEWM menu) and select RESTART in that menu.


keys file

The keys config file inside .icewm directory allows you to especify shortcuts to applications in such a way that you can launch those that you use more often straight from the keyboard without having to look for them in the menus. Let's see an example for the keys file:

  key "Alt+Ctrl+t" wterm -bg black -fg gray -sr -fn 7x13 -g 80x25
  key "Alt+Ctrl+n" netscape -noraise -remote openBrowser
  key "Alt+Ctrl+m" wterm -g 84x40+135+40 -sr -bg black -fg gray -fn 9x15 -e mutt
  key "Alt+Ctrl+s" wterm -g 84x40+135+40 -sr -bg black -fg gray -fn 9x15 -e slrn -n
  key "Alt+Ctrl+x" xchat
  key "Alt+Ctrl+g" gkrellm
  key "Alt+Ctrl+l" lyx

With the previous file (and after restarting ICEWM with menu's option Logout -> Restart ICEWM if we just modified it, so it can reload the file changes without restarting the X Server), when we wish to launch a xterm we just will have to press CTRL+ALT+t, for instance.


winoptions file

The winoptions file is very interesting. For editing it we can:
  • Tell an application to pop up just in a concrete virtual desktop. For example, that when we launch netscape (either with our keyboard o trough the menus, or through any other program), it will open in the second virtual desktop so it doesn't cover our already there windows on desktop number one.
  • Tell ICEWM that we don't want a concrete open application to appear in the taskbar, or that we don't want the ALT+TAB combination to be able to catch it (for example, for applications such as CD players that we have always with the Always On Top option set, and we don't need at all their entry in the taskbar).
  • Define certain applications' behaviour (maximizable or not, minimizable or not, etc.).

Let's see a winoptions config file example:

  xchat.workspace: 0

  Netscape.workspace: 1

  xterm.icon: xterm

  Gimp.toolbox.fMaximize: 0
  Gimp.toolbox.dMaximize: 0
  Gimp.toolbox.fResize: 0
  Gimp.toolbox.dResize: 0

  gkrellm.ignoreWinList: 1
  gkrellm.ignoreTaskBar: 1
  gkrellm.ignoreQuickSwitch: 1
  gkrellm.workspace: 0

  alarmd.ignoreWinList: 1
  alarmd.ignoreTaskBar: 1
  alarmd.ignoreQuickSwitch: 1
  alarmd.workspace: 3
  korganizer.workspace: 3

  lyx.workspace: 2
  soffice.workspace: 3

With the previous commands we tell ICEWM (among other things) that we want netscape to be open always on workspace1, Lyx on 2, StarOffice on 3, and that we don't want gkrellm to be on the taskbar or be accessible through the ALT+TAB key combination.


toolbar file

The toolbar file shows the shortcuts to the applications that appear in the Icewm taskbar. For example:

  prog WTerm xterm wterm -fg gray -bg black -fn 7x13 -sr -g 80x25
  prog KWrite kwrite kwrite
  prog Mutt kmail wterm -g 84x40+115+40 -bg black -fg gray -fn 9x15 -e mutt
  prog Slrn kmail wterm -g 84x40+115+40 -bg black -fg gray -fn 9x15 -e slrn -n
  prog Netscape netscape netscape
  prog XChat commandl xchat

File format is:

  prog NOMBRE file_icon command

 
First line in our previous config file associates the wterm program with the icon xterm (in .icewm/icons/ , in xpm format, the file xterm_16x16.xpm), and whose associated command when we click on it is all the whole rest of the line (that means that will launch wterm with its concrete colour and font options).


menu file

The menu file shows the different application entries that we'll find in the ICEWM taskbar when we press on the button that lies on the left side of the taskbar (like the Start button in other O.S.).

This file's format is similar to toolbar's, except for the fact that we can add separators plus create new menu entries. As an example:

  prog WTerm xterm wterm -fg gray -bg black -fn 7x13 -sr -g 80x25
  prog Netscape netscape netscape
  prog Xchat xisp xchat
  prog XNetload xterm xnetload -i ppp0
  separator
  menu Aplicaciones folder {
      menu Editores folder {
          prog kwrite kwrite kwrite
          prog joe joe xterm -e joe
          prog StarOffice pdf /opt/Office52/program/soffice
          prog LyX lyx lyx
      }
      menu Graficos folder {
          prog Gimp gimp gimp
          prog XV xv xv
          prog XPaint xpaint xpaint
      }
      prog StarOffice pdf soffice
      prog "Acrobat Reader" pdf acroread
      prog "PDF Viewer" pdf xpdf
      prog "KGhostview" ghostview kghostview
  }
  menu Juegos folder {
      prog kmahjongg kmahjongg kmahjongg
      prog XBill xbill xbill
  }
  menu Internet folder {
      prog "Netscape Navigator" netscape netscape
      prog Lynx lynx xterm -e lynx
      prog KvIRC kvirc kvirc
      prog xchat xchat xchat
      prog "Netscape Messenger" netscape netscape -messenger
  }
  menu Sistema folder {
      prog "Control Panel" redhat control-panel
      prog xload xload xload
      prog xosview xosview xosview
      prog xnetload xnetload xnetload ppp0
  }
  separator
  prog IcePref xterm icepref
  prog KIceMenu xterm kicemenu

As you can see, this file is formed by prog lines with the same format as in toolbar file, and with some extra options like separator (line separator between options) and menu, that allows you to add a new menu entry (a submenu) inserting new programs between { and } simbols.

Notice that we can put long names for programs if we put them between double qoutes, and that if one of the applications we add is not present in the system, this option won't show up when we enter the menu, no matter if we typed it into the file. This permits you to insert lines for a bunch of programs (though we don't have them installed yet) so they will go popping up as soon as they are installed or uninstalled.


preferences file

The last of the config files to be considered is the most extense and it contains all the general icewm options, as for example the desktop colour or wallpaper, window behaviours, clock format, number of virtual desktops, if we want icewm to notice us on new mail arrival and tell us how many new messages we've got, if we want a CPU meter or a net meter or ppp meter to be present at the tastkbar, the default theme, etc.

Let's see some of the options in .icewm/preferences, just as an example:


  #--- File begins with window options: ---
  # Focus windows by clicking
  ClickToFocus=1 # 0 / 1

  # Raise windows when focused
  RaiseOnFocus=1 # 0 / 1

  # Focus window when client area clicked
  FocusOnClickClient=1 # 0 / 1

  # etc. etc. etc.

  #--- There are also taskbar options to be modified: ---
  #--- There are dozens of options, we'll see just a few of them ---
  # Show task bar
  ShowTaskBar=1 # 0 / 1

  # Task bar at top of the screen
  TaskBarAtTop=0 # 0 / 1

  # Auto hide task bar after delay
  TaskBarAutoHide=0 # 0 / 1

  #--- Other interesting options are the ones that regard commands: here ---
  #--- we choose which commands to execute when we press the ---
  #--- shutdown or reboot buttons in the CTRL ALT SUPR menu, for example---
  # Command to cancel logout
  LogoutCancelCommand=""

  # Command to shut down the system
  ShutdownCommand="sudo shutdown -h now"

  # Command to reboot the system
  RebootCommand="sudo shutdown -r now"

  # Command to run when CPU status monitor is clicked
  CPUStatusCommand="xosview"

There is a bigger amount of options, and all of them are described in the file itself. We'll just need to modify those we need and restart ICEWM with the restart option for the changes to be effective.



Previous: General ICEWM characteristics
Next: ICEWM configuration using external tools


Page created by the ICEWM-addicts Santiago Romero, Javier Malonda, flytrap and Jose A. Calvo .

email-compiler@escomposlinux.org