sites

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

index.md (5068B)


      1 xfce4-panel
      2 ===========
      3 
      4 Description
      5 -----------
      6 
      7 When xfce4 tools are on the system anyway, it might make sense to try `xfce4-panel` in dwm.
      8 
      9 This patch modifies dwm, so that it treats any window with name `xfce4-panel` (default)
     10 as a status bar, i.e.:
     11 
     12 - it never has borders
     13 - always has y=0 on the monitor it is shown at (see below)
     14 - it is never shown as active window in the tag indicators
     15 - it is shown on all tags (via a tag rule in the config)
     16 - it is ignored on `focusstack` (MOD+j / MOD+k)
     17 
     18 ![dwm_xfce4-panel.png](dwm_xfce4-panel.png)
     19 
     20 - The panel does also act as **systray** for third party tools
     21 - Looks best when background is set to same color as the dwm statusline (black in the example)
     22 - Using a compositor you can dimm or completely hide it, when not hovered
     23 
     24 The patch has been created against dwm6.3 but will apply on 6.2 as well.  
     25 
     26 Download
     27 --------
     28 
     29 * [dwm-xfce4-panel-20220306-d39e2f3.diff](dwm-xfce4-panel-20220306-d39e2f3.diff) (2022-03-06)
     30 
     31 * Older version(s):
     32 
     33     - [dwm-xfce4-panel-20210701-67d76bd.diff](dwm-xfce4-panel-20210701-67d76bd.diff) (2021-07-01)
     34 
     35 Notes
     36 -----
     37 
     38 - The workspace switcher won't work interactively, but dwm's interactive tag indicators remain on
     39   the left anyway.
     40 - Some actions in the "session menu" applet (the one with your name as title) won't work out of the
     41   box. You might supply your own sub menu or modify the actions of the existing one.
     42 - The rest of xfce4's 40 or so panel apps _should_ work (if installed) and also custom "applets"
     43   (see below) are working 
     44 - Startup: A start via xinitrc should be fine. I use the [autostart](https://dwm.suckless.org/patches/autostart/) patch to start in background:
     45 
     46         sleep 0.3
     47         xfce4-panel --disable-wm-check
     48 
     49 
     50 Panel Config
     51 ------------
     52 
     53 **dwm**
     54 
     55 In dwm `config.h` rules, the panel should be configured to be shown on all tags and floating - see the patch.
     56 
     57 **xfce4-panel**
     58 
     59 You can inspect and set attributes in the command line via `xconf-query` (you could also do it via
     60 right mouse click and go to panel settings).
     61 
     62 Here are *all* settings as I have it:
     63 
     64     ~ ❯ xfconf-query -c xfce4-panel -p /panels/panel-1 -lv
     65     /panels/panel-1/autohide-behavior  0
     66     /panels/panel-1/background-alpha   1
     67     /panels/panel-1/background-rgba    <<UNSUPPORTED>>
     68     /panels/panel-1/background-style   1
     69     /panels/panel-1/disable-struts     true
     70     /panels/panel-1/enter-opacity      100
     71     /panels/panel-1/icon-size          0
     72     /panels/panel-1/leave-opacity      45
     73     /panels/panel-1/length             5
     74     /panels/panel-1/length-adjust      true
     75     /panels/panel-1/nrows              1
     76     /panels/panel-1/output-name        Primary
     77     /panels/panel-1/plugin-ids         <<UNSUPPORTED>>
     78     /panels/panel-1/position           p=0;x=5000;y=0
     79     /panels/panel-1/position-locked    true
     80     /panels/panel-1/size               21
     81     /panels/panel-1/span-monitors      false
     82 
     83 Discussion:
     84 
     85 - `position`: Configure the position to be at `y=0` and `x=<a big number>` to get a panel top right
     86   (it will *use* the maximum possible x). See [here](https://forum.xfce.org/viewtopic.php?id=12149) for more on that.
     87         xfconf-query -c xfce4-panel -p /panels/panel-1/position -s 'p=0;x=5000;y=0' # -s: Set a value
     88 - `leave-opacity`: Requires a compositor like picom. Set it to 0 to completely hide the panel when
     89   not hovered.
     90 - `size`: 21 matches the height of dwm status bar
     91 - `output-name`: Set to "Primary" instead of a fixed display name, in order to have support for
     92   multi monitor layouts.
     93 
     94 **Multi Monitor Support**
     95 
     96 I recommend using 
     97 
     98 - [`arandr`](https://christian.amsuess.com/tools/arandr/) to *create* a new layout
     99 - [`autorandr`](https://github.com/phillipberndt/autorandr) to store and *apply* a layout automatically after
    100   state changes (via `autorandr -c`). This also supports hooks after switching.
    101 
    102 ---
    103 
    104 Below is a usage example for adding your own information into the panel.
    105 
    106 
    107 Optional: Using the `genmon` Applet
    108 -----------------------------------
    109 
    110 Most panels offer the possibility to include generic scripts output.  
    111 In `xfce4-panel` this is done by the panel item: "Generic Monitor" (genmon). It features output styled with pango markup and mouseover/onclick hooks.
    112 
    113 Here are some `genmon` script collections:
    114 - [xfce4-genmon-scripts](https://awesomeopensource.com/project/xtonousou/xfce4-genmon-scripts)
    115 - [xfce4-genmon-scripts-2](https://github.com/almaceleste/xfce4-genmon-scripts)
    116 - [xfce4-genmon-scripts-3](https://github.com/levimake/xfce4-genmon-panel-scripts)
    117 
    118 Manual is [here](https://docs.xfce.org/panel-plugins/xfce4-genmon-plugin/start#usage).
    119 
    120 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:
    121 
    122 ![genmon.png](genmon.png)
    123 
    124 To get that, I cat the content of a file generated by this script, started in `autostart.sh` in the background:
    125 [cpu_mon.py](cpu_mon.py).
    126 
    127 
    128 Author
    129 -------
    130 * Gunther Klessinger <gklessinger[at]gmx.de>
    131 
    132