HOWTO: IceWM Configuration

Add your Tips and tricks to configure and tweak your GhostBSD System here.
Post Reply
User avatar
macondo
Posts: 47
Joined: Fri Jan 06, 2017 1:04 pm
Location: PANAMA

HOWTO: IceWM Configuration

Post by macondo »

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.

Code: Select all

$ 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.

Code: Select all

$ 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:

Code: Select all

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

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

Code: Select all

# Hide title bar when maximized
HideTitleBarWhenMaximized=1


Restart icewm, restart icewm, restart icewm :D

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:

Code: Select all

    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:

Code: Select all

$ nano .icewm/keys

Copy/paste this:

Code: Select all


    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.

Code: Select all

$ 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:

Code: Select all

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.

Code: Select all

$ pkg search alsa

Installed the alsa packages plus aumix and menumaker:

Code: Select all

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

Config the sound volume:

Code: Select all

$ alsamixer

Unmute sound with letter M


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

Code: Select all

$ nano .icewm/winoptions

Code: Select all

roxterm.Roxterm.startMaximized: 1
xchat.Xchat.startMaximized: 1
firefox.Firefox.startMaximized: 1
xfe.Xfe.startMaximized: 1
hexchat.Hexchat.startMaximized: 1
libreoffice.Libreoffice.startMaximized: 1
mirage.Mirage.startMaximized: 1

save/exit

PREFOVERRIDE

Code: Select all

$ nano .icewm/prefoverride

And paste this:

Code: Select all

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 http://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:

Code: Select all

$ 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

The first time you Restart, you do it from the menu, afterwards, with
the keys.

I start IceWM from my /home/username/.xinitrc
Just put 'exec icewm', save/exit.

IOW,

Code: Select all

nano /home/username/.xinitrc
And put this:

Code: Select all

exec icewm
save/exit

Scrennies
Image Image
Desktop Celeron with 4 gigs RAM - icewm/jwm/ratpoison - FreeBSD 11.1/GhostBSD 11.1
KISS - Keep It Simple, Stupid
User avatar
macondo
Posts: 47
Joined: Fri Jan 06, 2017 1:04 pm
Location: PANAMA

Re: HOWTO: IceWM Configuration

Post by macondo »

Update: My new sound keybindings:

Code: Select all

    #Sound
    key "Ctrl+Down"      aumix -v -9             # lower volume
    key "Ctrl+Up"    aumix -v +9             # raise volume
IOW, Control key and the Down arrow will lower the sound.
Contrl key and the Up arrow will raise the volume.
Restart IceWm (Ctrl+Alt+Delete + r) OR Windows key+Delete+r)
Or reboot if it doesn't work right away.
Desktop Celeron with 4 gigs RAM - icewm/jwm/ratpoison - FreeBSD 11.1/GhostBSD 11.1
KISS - Keep It Simple, Stupid
User avatar
JWJones
Posts: 7
Joined: Fri Jan 31, 2014 12:30 am
Location: Cascadia

Re: HOWTO: IceWM Configuration

Post by JWJones »

I like your IceWM setup, and xfe is my favorite file manager. Is that the 'Shades of Gray' theme?
Resist much, obey little.
Post Reply