• 0 Posts
  • 3 Comments
Joined 7 months ago
cake
Cake day: April 10th, 2024

help-circle


  • 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.