sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

commit 47d5115fcbd39cfc4a638a7812b88c54a03c21a0
parent ab0274cdb62aca68114fa13add8ba8f726e0e4c7
Author: Gunther Klessinger <gunther.klessinger@axiros.com>
Date:   Thu, 17 Jun 2021 08:14:57 +0200

xfce4-panel: More Detailed Docu.

Especially a valid screen layout is vital to make it not suck, so
I explain in detail how this is achieved.

Maintainers: Please leave the double spaces at the end of certain lines - this is markdown grammar for line breaks, and is understood by `smu`.

Diffstat:
Mdwm.suckless.org/patches/xfce4-panel/index.md | 60++++++++++++++++++++++++++++++++++++++++--------------------
1 file changed, 40 insertions(+), 20 deletions(-)

diff --git a/dwm.suckless.org/patches/xfce4-panel/index.md b/dwm.suckless.org/patches/xfce4-panel/index.md @@ -5,7 +5,7 @@ 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 the window with name `xfce4-panel` (default) +This patch modifies dwm, so that it treats any window with name `xfce4-panel` (default) as a status bar, i.e.: - it never has borders @@ -16,8 +16,9 @@ as a status bar, i.e.: ![dwm_xfce4-panel.png](dwm_xfce4-panel.png) -- Looks best when background is set to solid color, same as the dwm statusline (black in the example) - The panel does act as systray for third party tools, i.e. the systray patch is no more required +- Looks best when background is set to solid color, same as the dwm statusline (black in the example) +- Using a compositor you can dimm or completely hide it, when not hovered The patch has been created against dwm6.2. @@ -31,8 +32,9 @@ Download Notes ----- -- The workspace switcher won't work (but dwm's tag switcher remains anyway on the left) -- The rest of xfce4's 40 or so panel apps _should_ work (if installed) +- The workspace switcher won't work interactively, but dwm's interactive tag indicators remain on the left anyway. +- Some actions in the "session menu" applet (the one with your name as title) won't work out of the box. You might supply your own sub menu or modify the actions of the existing one. +- The rest of xfce4's 40 or so panel apps _should_ work (if installed) and also custom "applets" (see below) are working - Startup: A start via xinitrc should be fine. I use the [autostart](https://dwm.suckless.org/patches/autostart/) patch to start in background: @@ -43,32 +45,50 @@ Notes Panel Config ------------ -Done via XFCE4 tools. +**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`](https://christian.amsuess.com/tools/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: - Configure exactly one Panel, e.g. via `xfce4-settings-manager` -> `panel` - At Tab Display: - - Mode Horizontal - - Output: Your primary monitor (with y=0). Panel will stay there(!) - - Lock Panel: false - - Don't reserve space on borders: true - - Row size: 23 pixel, 1 row works for me - - Autom. increase the length: true + - Mode Horizontal + - Output: Your primary monitor (with y=0). Panel will stay there(!) + - Lock Panel: false + - Row size: Should probably match height of dwm statusbar, which depends on your dwm font size. + - Autom. increase the length: true + - Length: 1% (will auto adapt) + +- At Tab Appearance: + + - Adjust icon size automatically + - Autohide when not hovered: Run a compositor e.g. `picom` and set panel's "leave opacity" to 0. That way you could have a minimalistic dwm statusbar normally and the full interactive status bar only on mouse over. I prefer to rather dimm it down to an unobtrusive 30%. + +Also the _content_ of the panel you configure "normally", i.e. by adding items in the panel's items tab or via [CLI tools](https://docs.xfce.org/xfce/xfconf/xfconf-query). -The _content_ of the panel you configure "normally", i.e. by adding items in the panel's items tab or via CLI tools. +Tips: -Having *different* panels in a xfce4 than in a dwm session with the same user I did not try. -I guess it should be possible via the backup and restore tool of the panel UI and [xfconf](https://docs.xfce.org/xfce/xfconf/xfconf-query). +- The warning `Failed to connect to session manager` at panel startup is normal. I do not advise to start `xfce4-session` from within dwm to fix it. This will try auto explore your available workspaces - and possibly conclude you have `2**9 * monitor count`, writing that back into the xfce4 config. I had to manually clean up the config via [xfconf](https://docs.xfce.org/xfce/xfconf/xfconf-query). +- Using xfconf and the panel config backup/restore tool might be the best way to have *different* panel setups in xfce4 and dwm, should you want to use xfce4 as well, where people often run more than one panel. -Tip: *Never* try start `xfce4-session` from within dwm, the warning `Failed to connect to session manager` at panel startup is normal. It will try autoexplore your available workspaces - and conclude you have `2**9`, writing that back into the xfce4 config... I had to manually clean up the config via `xfconf`. -Below is a usage example. +Below is a usage example for adding your own information into the panel. -Using the `genmon` Applet -------------------------- +Optional: Using the `genmon` Applet +----------------------------------- -Any panel offers the possibility to include generic scripts output. +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: @@ -78,7 +98,7 @@ Here are some `genmon` script collections: Manual is [here](https://docs.xfce.org/panel-plugins/xfce4-genmon-plugin/start#usage). -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: +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](genmon.png)