xfce4-panel

Description

When xfce4 tools are on the system anyway, it might make sense to use the xfce4-panel in dwm. This patch modifies dwm, so that it treats any window with name xfce4-panel (default) as a status bar, i.e.:

dwm_xfce4-panel.png

The patch has been created against dwm6.2.

Download

Notes

Panel Config

dwm
In dwm's rules, the panel should be configured to be shown on all tags - see the patch.

xrandr:
Since the panel will reside always at y=0, a matching xrandr screenlayout must contain --pos 0x0 for the monitor where the panel should be shown. That monitor must be connected, otherwise the panel won't be visible or pop up in the middle of another monitor. When you unplug that monitor, you need to have a valid new screen layout loaded. I use the monitor marked --primary. The arandr tool will create valid configs. I always have a fallback layout, with the laptop display configured primary, at 0x0.

# Example:
xrandr --output eDP-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal

You can verify your screen layout using e.g. the xev tool, which reports the mouse coordinates relative to root.

xfce4-panel config:
The rest of the config is done via XFCE4's internal tools, available e.g. via xfce4-settings-manager -> panel:

Also the content of the panel you configure "normally", i.e. by adding items in the panel's items tab or via CLI tools.

Tips:

Below is a usage example for adding your own information into the panel.

Optional: Using the genmon Applet

Most panels offer the possibility to include generic scripts output.
In xfce4-panel this is done by the panel item: "Generic Monitor" (genmon). It features output styled with pango markup and mouseover/onclick hooks.

Here are some genmon script collections:

Manual is here.

Personally I wanted to have CPU monitor, which shows the name of current high cpu eater(s) if present (next to current load by core) and on mouseover remembers the top output from the most recent high load situation in the past:

genmon.png

To get that, I cat the content of a file generated by this script, started in autostart.sh in the background: cpu_mon.py.

Author