Some Pekwm configurations

December 30, 2007

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 πŸ™‚


12 Responses to “Some Pekwm configurations”

  1. […] 5, 2008 Earlier I wrote about my attempts to make Pekwm behave more like the default behaviour of Openbox. I have […]

  2. […] Earlier I have written about how you can use the screen edges to semi-autohide the harbour, but their potential is much greater. I will describe two examples here, and hint at a few more uses . […]

  3. James said

    Hey dude,

    What is the terminal software in the screenshot?


  4. urukrama said

    That is the xfce4-terminal, using my Awakening Pekwm theme.

  5. ennt said

    I’m sorry but don’t know where to post..

    Can I use xfce compositor with pekwm? How can I combine both? xfce and pekwm..
    I hope you could reply coz.. I’ve some problem with pekwm and xcompmgr.. 😦

    Btw.. Thank you for all your guides and tips

  6. urukrama said

    Thank you.

    You won’t be able to use Xfce’s compositor with Pekwm, as it is a part of Xfce’s window manager and you can only run one window manager at a time.

    I no longer use xcompmgr, so I’m afraid I can’t help you with the problem.

  7. ee_lars said

    Very nice desk urukrama congrats πŸ™‚
    Is the “panel” (at the lower center of your desk) harbour??? i thought it wasn’t possible to show it like that…

  8. urukrama said


    The panel in that screenshot is just pypanel.

  9. Dann said

    Anyone knows if it is possible to set auto-raise on windows, but with a delay, like fluxbox or openbox?

    And if there’s a non-panel substitute for system tray and clock? I picture the clock on the title bar, at the left of the window management buttons, and the system tray as some sort of pipe menu on the main menu…

  10. Andreas said

    Thanks a lot for this post, helped me get rid of the focus/non-focus anoyances. Have used openbox before, but I missed some theming and configuration.

  11. where from can we download this configuration you created? i couldn’t understand how harbour works… – thanks!

  12. […] For some ideas of what you can do with the Mouse and Keys file, have a look here. […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: