Bmpanel2 customizable mouse actions

I’ve just added them to the git.

  1. Currently you can use only 3 buttons on your mouse.
  2. There are 3 actions available: ‘use’, ‘drag’ and ‘kill’. ‘Use’ for task/desktop activation, ‘drag’ for drag and drop and ‘kill’ for killing tasks.
  3. You can assign multiple actions for each mouse button, just list them with space as a separator.
  4. Also bmpanel2cfg support for this isn’t here yet (but it will be).
  5. You are free to do stupid things like assigning ‘use’ and ‘kill’ to the same button. It will work, but it’s just stupid. 😀

The default values in the config file (~/.config/bmpanel2/bmpanel2rc) will look like this:

mbutton1 use drag
mbutton2 kill

Note that mbutton2 is a middle mouse button usually (mbutton1 is LMB and mbutton3 is RMB). That’s it I guess. If there are any bugs, send them here.

P.S. However there is a problem with clock widget. The ‘clock_prog’ is fired up depending on ‘clock_mouse_button’ parameter. I’m not sure what should I do about this.

Bmpanel2 update

Alternative widgets system and Pager widget were uploaded to the upstream git tree. There will be more updates however in a code and in the Bmpanel2 Theme Reference. Currently you can try it out using xsocam-dark theme and bmpanel2cfg utility (section “Alternatives”, select “pager”).

Happy bmpanel2 using!

P.S. Expect bugs…

Bmpanel2 update

First of all, I’d like to start from bugs that were fixed (or at least I think they were). There was a bug with clock text and I thought it was fixed long time ago, but it wasn’t. In this patch set I did few more updates to that code and now, finally, I think it works fine. Please, if you see this glitch again after the update, let me know.

And now let’s talk about multihead support. Basically I decided to fully implement xinerama/xrandr dependent functionality and here how it works:

  1. There are a lot of words: Xinerama, XRandR, TwinView, etc. but almost all of them about the same. Technically, all I need to know about your system is how many monitors you have and what their geometry/position are. I can use two X extensions to retrieve that kind of information: XRandR or Xinerama. I prefer Xinerama (CMake option: BMPANEL2_FEATURE_XINERAMA) currently, and XRandR is disabled by default (CMake option: BMPANEL2_FEATURE_XRANDR). Yes, I know that Xinerama is declared as deprecated, but currently I think it works well even when your system is configured with XRandR. However, bmpanel2 coded in a way that it can use both, just enable them both if you want. But still, preference is given to the Xinerama and if it is enabled on your system it will be used instead of XRandR (unless you have disabled Xinerama completely of course). So, if something went wrong, try ON/OFF these options (you can do it using cmake command line like that: cmake -DBMPANEL2_FEATURE_XRANDR=ON -DBMPANEL2_FEATURE_XINERAMA=OFF).
  2. There is a problem with “strut” thing. If you’re interested in details read NETWM standard (just search for “strut” there). As user all you want to know that it is a bad choice to place the bmpanel2 between monitors (for example if you have one monitor on top of another). If you do, your windows will cover the panel in the maximized mode. It’s because standard currently doesn’t allow to deal with this situation properly. In other words – panel should stay on the edge of the combined virtual screen. If you still don’t know what I’m talking about, see this image showing hypothetic monitors array (green are good positions, red are bad positions, blue are monitors):
  3. The next issue is Window Managers. I checked few, and here is the list of working ones:  Openbox, Fluxbox, Xfwm4. These are not working properly: IceWM, PekWM. I guess my priority is standalone window managers like Openbox and PekWM, but in that case I can’t do anything about PekWM, ask its authors to implement full support of a _NET_WM_STRUT_PARTIAL and proper work with multiple monitors (e.g. maximizing windows accordingly). Also there are few minor differences in WMs behaviour, for example some of the WMs keep sending window position changes while you’re moving a window (IceWM, PekWM, Xfwm4), others send these notifications only when you have released a window (Openbox, Fluxbox) and it affects panel in a way that tasks move on another monitor only when the panel is being notified that windows had been moved. But that’s a minor issue I guess.
  4. And finally, the User Guide or what you need to know as a bmpanel2 user. First let’s see a brief list of changes:
    • Bmpanel2 now doesn’t take into account the current workspace bounds. It means that you can’t stack panels one on top of another anymore. This feature was a hack and isn’t described anyhow in the NETWM standard. Maybe It will be back in the future.
    • Clock text bug fix (was mentioned in the beginning of the post).
    • Added new option to the bmpanel2 config and bmpanel2cfg utility: monitor. It allows you to specify on which monitor bmpanel2 should reside (starting from 0). Currently it isn’t possible to span bmpanel2 across monitors (well, unless you have disabled XRandR and Xinerama code completely).
    • Added new command line option to the bmpanel2: –config. Which allows you to override default config file. I recommend you to use full paths here always.
    • Now it is possible to specify the config file path in the bmpanel2cfg as a first command line argument when you’re running it (for example: bmpanel2cfg /path/to/non/default/configrc). It is used in pid (process id) searching algorithm. Basically it check if there is a running panel that was started with that config file as an argument and uses it as a target to send reload requests to. With this feature it is possible to use bmpanel2cfg with different instances of bmpanel2.
    • New cmake build options (these are booleans): BMPANEL2_FEATURE_XRANDR (off by default) and BMPANEL2_FEATURE_XINERAMA (on by default). They were described above.
    • Added new option to the bmpanel2 config and bmpanel2cfg utility: task_visible_monitors. You should read it as: Task is marked as visible if it is located on one of these monitors. This option basically a string of space separated numbers (for example: task_visible_monitors 0 1, means that windows from the first and the second monitor will be shown as tasks on the taskbar). There is one restriction however, current maximum number of monitors which this option can handle is 32. If anyone has X11 and bmpanel2 running on more that 32 monitors, please send me a photo of your *uhm* array of monitors and I will fix it for you immediately ;-).
    • New taskbar task visibility logic. By default taskbar shows only tasks from the current monitor (specified by monitor option). But you can customize this behaviour using task_visible_monitors option as described above.

    Ok, now what you need to do to start these things up. I will show you on a two monitors example. Let’s suppose we have monitor 0 and 1 (in terms of bmpanel2):

    • 1. We need to copy a usual bmpanel2 config file for a second monitor:
    • cp ~/.config/bmpanel2/bmpanel2rc ~/.config/bmpanel2/bmpanel2rc_mon1
    • 2. Then open if with your preferred text editor (I use vim):
    • vim ~/.config/bmpanel2/bmpanel2rc_mon1
    • 3. Add the monitor option here at the end of the file:
    • monitor 1
    • 4. Now you’re ready to run:
    • bmpanel2 &
    • bmpanel2 --config ~/.config/bmpanel2/bmpanel2rc_mon1 &

    Also of course you can modify a theme in this second config file. Or even copy a theme to your ~/.local/share/bmpanel2/themes dir and modify/rename it slightly. For example you might want to remove some widgets from it and/or change the position. If you want to configure your second panel instance with bmpanel2cfg, just use it’s config file as a first argument for bmpanel2cfg utility: bmpanel2cfg ~/.config/bmpanel2/bmpanel2rc_mon1. But don’t forget that it is the shell what changes the “~” to your HOME directory. If you want to add the bmpanel2cfg to let’s say a launch bar, you should use full path (e.g. bmpanel2cfg /home/nsf/.config/bmpanel2/bmpanel2rc_mon1).

And at the end I’d like to say that currently bmpanel2 isn’t actively developed. I’m making changes when there is something that I don’t like, so don’t be mad at me because I’m refusing to implement your feature. But I like to fix bugs, because they are quite challenging and interesting tasks by themselves. Some bugs are much harder to fix than another, so it may take time. Well, that is all I wanted to say. Happy bmpanel2 using.

P.S. Patches were uploaded to the upstream git repositories.

Bmpanel 2.1pre1

Please check it out. If everything is ok, it will be the 2.1 release.

As usual the package is here:

Few important changes

I’ve finished theme integration to the source tree. Here is the list of themes which were integrated:

  • Alduin
  • Auriel
  • Curvy
  • Flora
  • Striped

The reason why I’ve included these themes into the source tree is because they are nicely showing what can you do with bmpanel2.

And now the important part:

All themes in the source tree are named like that: “long-theme-name” (e.g. alduin-glossy, xsocam-dark, flora-green, etc.). It means that after updating to the latest git or to 2.1 you’ll probably need to clean a little bit your ~/.local/share/bmpanel2/themes directory and maybe tweak a config file. Please notice that “xsocam_dark” was renamed to “xsocam-dark” too.

Brief changes list for 2.1

Changes since 2.0.1a (basicly just a copy&paste from git log):

  • Fix bug with ellipsize feature.
  • Fix bug with xfwm4 modal dialogs (xfce4).
  • Fix texture filtering mode (ugly corners in some cases).
  • Fix image leak in systray code.
  • Add “center_offsets” parameter (used in “stretched*” modes).
  • Use all button states for width calculation in desktop switcher.
  • Fix bug with “demands attention feature”.
  • Disable “demands attention” flag when user activates the window.
  • Add SIGUSR1 signal handler which implements the “reconfigure” action.
  • Make “task_urgency_hint” (“demands attention” feature) disabled by default.
  • Add clock mouse button actions.
  • Change default drawing mode to OVER in pseudo-transparency render.
  • Add “paint_replace” widget parameter (switches drawing mode back to REPLACE).
  • Add delayed widgets destroying for “reconfigure”. Allows really smooth reconfigures.
  • Add bmpanel2 config tool (bmpanel2cfg), depends on python and pygtk.
  • Add launchbar to themes in distribution.

The 2.1 release isn’t here yet. But soon it will be there. 🙂

Bmpanel2 theme reference update

I hope now it is somewhat complete. Check it out there:

If something isn’t clear, mail me. If you know how to explain some things better than I do, or you’ve spotted a misspelling – mail me also. My english sucks and I wish I could make the reference better somehow. Also if you want to translate it or do something else with it – feel free to do it, I don’t care about any kind of copyrights here.

See ya! 🙂

P.S. You can find sources of this reference in the git.