In my recent experiments with Wayland, I find my self still very much trying to decide on a decent panel.

At present, I am wrestling with the configs for sfwbar - mainly because the documentation seems fairly sparse. Lots other people seem to use it, though, so it must be possible to figure it out.

I’m currently struggling with three particular aspects:

  1. How to prevent windows maximising over or under the bar. At the moment the bottom of all my windows is hidden under the panel.

  2. Configuring some sort of network data for the widget. At the moment I have a very simple LAN icon which, as a tooltip, displays static information that I could easily obtain with a simple “ip a”. What I really want is, at the very least, some way of monitoring when my interface is transferring data in one direction or the other. If it could tell me the amount of data that would be perfect. All I’ve been able to figure out so far from what docs there are is that it might be something to do with a NetStat function. How to use this function, however, is far from clear and I can’t find examples.

  3. How to get a bar on each of my monitors that, ideally, displays icons for only the windows on that monitor.

Any help gratefully received - thanks in advance!

  • Crion@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    7 months ago

    Can I check which certain of sfwbar you’re using? Also, can you post your config? Filtering shouldn’t make the bar disappear off course :)

      • Crion@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        7 months ago

        Ok, this is a bug triggered by combination of a grouped taskbar and an output filter. I fixed it in the latest git version. in case you want to try it now, or you can wait until beta15 to get this combination working. Thank for helping debug this usecase!

  • Crion@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    7 months ago

    Hi,

    1. Add: SetExclusiveZone "auto" to Function “SfwbarInit” in the config file. This will tell the compositor not to position windows over our under the bar. The actual behaviour will depend on your compositor though. I know some older compositors didn’t respect this.
    2. What you’re probably looking for is NetStat(“rxrate”) - this function gives you the incoming transfer rate on a network interface. You can specify a network interface as a second parameter, I.e. NetStat(“rxrate”, “eth0”). If you don’t specify an interface, it will query the interface for the default gateway. For outgoing traffic, you can use NetStat(“txrate”). Now, you still need to build a widget to visualise this on the bar, I.e. you can add the following to the layout section:
    Label {
      Value = Str(NetStat("rxrate")/1024) + "kbps"
      Css = "* { min-width: 100px; }"
      }
    

    And add module(“network”) at the beginning of your config to load the network module.

    This will add a basic string with an incoming transfer rate. Css min-width is there to prevent it from constantly resizing as the length of the string changes. You can use different widget types to visualise it in different ways of course.

    1. To mirror the bar across monitors, add: SetMirror "*" To Function. “SfwbarInit”

    If you want only windows for a given monitor to appear on each bar, you can add: filter = output To the taskbar widget definition within the layout.

    Hopefully this helps. Let me know if there is anything else you want to do.

    • daddyjones@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      7 months ago

      Everything seems to have worked well - except using ‘filter = output’ which causes sfwbar to vanish immediately after starting with no obvious error message…