# HOWTO: IceWM Configuration



## macondo (Jan 2, 2017)

HOWTO: IceWM Configuration (Verbose)

Obviously, this is a subjective matter. There are different ways of doing this, I like to edit the files.

IceWM comes by default with alt-tab to switch windows, alt-F10 to maximize, alt-F9 to minimize the screen, the Windows key will give you the main menu. In the main menu click on Settings > Focus and choose your favorite, (i like "Sloppy"). Do it again, and click on Themes and choose.

NOTE: winkey (Windows key) + space bar will give a 'run box' at the taskbar by default. from where you can launch apps a la fbrun.

If you go to the icewm site icewm.org -> IceWM Manual you get all the keybinds and mouse commands. It's a very worthwile read, it will teach you how to lock your screen (xtrlock), move a window to another workspace, screensavers, and so forth, how to start an app in a different workspace when you enter the X system, etc.

Congratulations! you're ready for prime time. Just point and click.

But if you want to increase your speed, if you're a geek wannabe, if the Windows way of working bring tears to your eyes, then KEYBINDINGS are for you.

My configuration uses 4 files: preferences, keys, winoptions, and prefoverride.

Preferences deals with the window manager's behavior.
Keys with keybinds.
Winoptions with options that alter the windows.
Prefoverride changes the default keybinds for the ones you like.

You CANNOT edit the global file, so you have to create them and put them in your /home.

The global file resides in /usr/local/share/icewm/preferences where all the preferences for IceWM are, copy/paste the ones relevant to your way of working, and put them in your ~/.icewm/preferences.

Now create these files in your /home, and edit them as USER. The directory .icewm already exists.


```
$ touch .icewm/preferences
$ touch .icewm/keys
$ touch .icewm/winoptions
$ touch .icewm/prefoverride
```

PREFERENCES
So now all you have to do is edit .icewm/preferences as USER.


```
$ nano .icewm/preferences
```

Bring the preferences you like from the global file and copy/paste them into your .icewm/preferences.

Every preference consists of 2 lines, both of which are commented (#), uncomment (erase the hash mark) on the second line of the preference, and add 1 or 0 (zero) at the end.

1 = enables the preference
0 = disables it.

save/exit and RESTART icewm - Menu >Logout >Restart icewm for it to take
effect.

Clear as mud?

Example:


```
# Hide title bar when maximized
#HideTitleBarWhenMaximized=0 # 0/1
```

After editing it, it should look like this if you wanted it enabled:


```
# Hide title bar when maximized
HideTitleBarWhenMaximized=1
```


Restart icewm, restart icewm, restart icewm 

Me?
I copied/pasted my personal preferences I stored in my icewm config folder in my web mail. It takes me 5 minutes to config icewm.

Here's my .icewm/preferences:


```
OpaqueMove=0
    OpaqueResize=0
    SmartPlacement=1
    MenuMouseTracking=1
    ModSuperIsCtrlAlt=1
    UseMouseWheel=1
    QuickSwitch=1
    AutoReloadMenus=1
    ShowProgramsMenu=1
    ShowThemesMenu=1
    ShowHelp=1
    TerminalCommand="roxterm"
    ShutdownCommand="sudo shutdown -p now"
    RebootCommand="sudo shutdown -r now"
    WorkspaceNames=" 1 ", " 2 "

    TaskBarAutoHide=0
    TaskBarShowClock=1
    TaskBarShowAPMStatus=0
    TaskBarAtTop=0
    TaskBarShowAPMStatus=0
    TaskBarShowAPMTime=0
    TaskBarShowMailboxStatus=0
    TaskBarShowWindows=1
    TaskBarShowShowDesktopButton=0
    TaskBarShowTray=1
    TaskBarShowWindowIcons=0
    TaskBarShowCPUStatus=1
    TaskBarShowNetStatus=0
    TaskBarShowCollapseButton=1
    TaskBarWorkspacesLeft=1
    TimeFormat="%R"
    TaskBarShowShowDesktopButton=0
    TaskBarShowWindowListMenu=1
    TaskBarShowMailboxStatus=0
    TaskBarMailboxStatusBeepOnNewMail=0
    NormalTaskBarFontName="-*-sans-medium-r-*-*-*-100-*-*-*-*-*- *"
    NormalTaskBarFontNameXft="sans-serif:size=10"
    ActiveTaskBarFontName="-*-sans-r-*-*-*-100-*-*-*-*-*-*"
    ActiveTaskBarFontNameXft="sans-serif:size=10"
    HideTitleBarWhenMaximized=0
```

save/exit your favorite editor.


KEYS
Same. Choose what you need. I erased everything and pasted my keybinds. This is my .icewm/keys:


```
$ nano .icewm/keys
```

Copy/paste this:


```
key "F1" roxterm
    key "F2" xfe
    key "F3" firefox
    key "F7" mirage
    key "F8" hexchat
    key "F9" libreoffice
    key "Print" roxterm -e scrot -cd 10

    #Sound
    key "Alt+Ctrl+KP_Divide"      aumix -v -5             # lower volume
    key "Alt+Ctrl+KP_Multiply"    aumix -v +5             # raise volume
```

Save/exit your editor.

Ctrl+Alt+ asterisk in numerical pad (to the right of keyboard) increases volume.

Ctrl+Alt+forward slash in the numpad, decreases volume

If you get no sound go to alsamixer as USER and unmute with M key.


```
$ alsamixer
```

Needless to say choose your favorite applications and keybinds.

I have no use for the Fn keys, but if you do, just add Alt or Ctrl or Super (winkey) example:


```
key "Alt+ l" leafpad
key "Ctrl+f" firefox
```

SOUND
A word about sound. In my case, I haven't had good luck with Pulseaudio, so I use ALSA.


```
$ pkg search alsa
```

Installed the alsa packages plus aumix and menumaker:


```
$ sudo pkg install aumix menumaker alsa-lib alsa-plugins alsa-utils
```

Config the sound volume:


```
$ alsamixer
```

Unmute sound with letter M


WINOPTIONS
Go to .icewm/winoptions and paste this, I'm only interested in maximizing my windows:


```
$ nano .icewm/winoptions
```


```
roxterm.Roxterm.startMaximized: 1
xchat.Xchat.startMaximized: 1
firefox.Firefox.startMaximized: 1
xfe.Xfe.startMaximized: 1
geany.Geany.startMaximized: 1
libreoffice.Libreoffice.startMaximized: 1
mirage.Mirage.startMaximized: 1
```

save/exit

PREFOVERRIDE


```
$ nano .icewm/prefoverride
```

And paste this:


```
KeyWinClose="F4"
KeyWinMaximize="F12"
```

save/exit

So now I close applications with F4 (boom! gone) and maximize the windows with
one key (F12), instead of the default Alt+F10.

THEMES
I'm not much for themes and eye-candy, my thing is simplicity and speed.

Go to www.box-look.org, click on "icewm themes" in the left column, if you know the name of the theme, click on "alphabetical". Click on Download. There are over 400 themes for IceWM in this site.
There are a bunch on the right column on the site.Download the theme file /home/<yourusername>/Downloads (automatic with Firefox).

I launch xfe (my file manager) as ROOT, I find the theme in Downloads, right-click on it, and choose "Extract to" in the next screen at the bottom I type the location where to be extracted, (/usr/local/share/icewm/themes) press Enter,  and that's it, the new theme appears in Settings>Themes from the main menu. Click on it and you'll have a new theme immediately.

MENU
In order to create a menu with menumaker:


```
$ mmaker -f icewm
```







NOTE: Restart icewm every time you do changes on the window manager.

There are 2 ways of restarting IceWM, from the main menu:
1. Main menu > Logout > Restart IceWM
2. Ctrl+Alt+Delete > Restart IceWM

Have fun,
macondo
Images:


----------



## macondo (Jan 3, 2017)

I forgot to mention: you can manage your sound volume, by pressing the winkey/Super/Mod4 instead of Ctrl+Alt AFTER you have finished the configuration. Do not change Ctrl+Alt in your .icewm/keys
This is due to this preference in your preferences file:


```
ModSuperIsCtrlAlt=1
```

Just to make sure, winkey+asterisk/slash forward.
Easier on your fingers 

Cheers,


----------



## macondo (Jan 4, 2017)

I just did a fresh installation and put this setup, mirage was not launching, it was missing a quotation mark. It is fixed now.


```
key "F7" mirage
```


----------



## macondo (Jan 4, 2017)

I neglected to mention how I start IceWM, I do thru my .xinitrc Sorry...


```
$ sudo nano /home/macondo/.xinitrc
```

And paste this:

```
#!/bin/sh

setxkbmap -model pc105 -layout es, ISO-8859-15-acc
firefox &
setxkbmap -option terminate:ctrl_alt_bksp
xsetroot -solid black
unclutter -idle 2 &
numlockx &

exec icewm
```

Or a simple exec icewm will do.


----------

