Some Pekwm configurations | urukrama's weblog

Written by Laurent Marechal - 31 march 2015

Classified in : Unix, Links - Tags : UI, Unix

Site d'origine : https://urukrama.wordpress.com/2007/12/30/some-pekwm-configurations/

I’ve recently started using Pekwm again. Pekwm is a light window manager, in looks similar to Openbox or Fluxbox that allows you to tab windows, has good keychains options, can use dynamic menus (‘pipe-menus’ in Openbox) and supports pixmap themes. I played with it a little nearly a year ago, but never long enough to explore all its possibilities. I’ve now grown very fond of it, and have worked out solutions to all the little things that bothered me at first. The documentation is excellent and covers all what you need to configure Pekwm (the documentation is for Pekwm 0.1.5, though, and doesn’t cover some of the new features introduced in the latest stable version, 0.1.6). Below are some of my own settings to make Pekwm behave the way I want it to. This is meant mainly to remind me what I did if I need to reinstall Pekwm later on, but perhaps some of you will find some use for it as well.

Focus on click

By default Pekwm focuses a window when you move your mouse over it. To change it to a ‘focus on click’ behaviour is made very simple by the developers. In your mouse file look for the following lines and do what it says:

#Remove the following line if you want to use click to focus.
And: #Uncomment the following line if windows should raise when clicked.

Changing the way the menu behaves

The default configuration in Pekwm (and Fluxbox, actually) for the display of menus, specifically the hiding or closing of menus, irritates me. To close an open menu, you either have to launch one of the items on the menu or right click on the menu heading. I am, however, used to Openbox’ approach: when you click anywhere outside the menu or when a new menu is launched, the open menu simply disappears. Here is how to achieve this in Pekwm.

All of this is obviously done in the mouse file. First of all, I added “HideAllMenus” before all “ShowMenu” commands. In this way, if I open the root menu any window menu that might have been open automatically disappears. Here is an example from the FrameTitle section:

ButtonRelease = "3" { Actions = "HideAllMenus; ShowMenu Window" }

Then add the same command to the right clicks on the window decorations and window clients. In the FrameTitle and OtherTitle sections, create the following line:

ButtonRelease = "1" { Actions = "HideAllMenus; Raise; Focus; ActivateClient" }

In the Client section, add the following:

ButtonPress = "1" { Actions = "HideAllMenus; Focus; Raise" }

Edit the following lines in the keys file, to make menus disappear when you switch desktops:

KeyPress = "Ctrl Mod1 Left" { Actions = "HideAllMenus; GotoWorkspace Left" }
KeyPress = "Ctrl Mod1 Right" { Actions = "HideAllMenus; GotoWorkspace Right" }

Autohiding the harbour

The harbour is Pekwm’s version of Openbox’ dock or Fluxbox’ slit. It is the place where dockapps are loaded. Unlike the dock and the slit, the harbour cannot be set to autohide. Since I don’t like panels, I use the harbour for a system tray (docker) and a clock (bbtime or lal), but I don’t want to have it always on top or always below all other windows; nor do I want a strut for it. Here is what I did to create a ‘semi-autohiding’ harbour. My harbour shows up in the lower right corner of my screen.

In the Down part of the ScreenEdge section of the mouse file, I added the following line:

Enter = "Any Any" { Actions = "Toggle HarbourHidden" }

This toggles the harbour whenever I move my mouse to the bottom of the screen. The downside is that there is no ‘autohide’ feature; to make the dock disappear again you have to move your mouse back to the bottom of the screen.

To set the harbour to disappear again, I’ve configured Pekwm to hide the harbour again when I click on a window or window title. I added the option “Set HarbourHidden” to the following lines.

In the Client section:

ButtonPress = "1" { Actions = "HideAllMenus; Set HarbourHidden; Focus; Raise" }

In the FrameTitle section:

ButtonRelease = "1" { Actions = "HideAllMenus; Set HarbourHidden; Raise; Focus; ActivateClient" }

In the OtherTItle section:

ButtonRelease = "1" { Actions = "HideAllMenus; Set HarbourHidden; Raise; Focus" }

This isn’t quite autohiding, but it is good enough for me.

Normal alt-tab behaviour

As I don’t use a panel, the way the alt-tab window switching works is a big deal for me. I’ve never grown very fond of Fluxbox, for example, because it doesn’t have an alt-tab display. The default alt-tab behaviour in Pekwm does not focus the next window and place it at the top of the list. The default alt-tab therefore switches between windows in the order that they were launched. Impractical in my book, but this is easy to change. In the keys file, change “NextFrame” and “PreviousFrame” into “NextFrameMRU” and “PreviousFrameMRU” (there is already a default entry with these commands). Reload Pekwm and you will have a ‘normal’ alt-tab.

Pekwm is a great window manager. The only downside is its scarcity of good themes. You can find a few on Box-look, Hewphoria, and FreshMeat, but most of these are visibly several years old (some aesthetics change rapidly). So if you use Pekwm and have some artistic ability, please create some new themes!

Here is a screenshot of my current Pekwm setup. Yes, that is a purple desktop :-)

Pekwm

Comments are closed.

SEARCH

Categories

Tags

Archives

Last articles

Last comments

 

Valid XHTML 1.0 Strict