8
submitted 7 months ago by daddyjones@lemmy.world to c/linux@lemmy.world

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!

top 6 comments
sorted by: hot top controversial new old
[-] Crion@lemmy.world 2 points 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.world 1 points 7 months ago

Thanks - this is excellent and I shall give it all a go and let you know how I got on.

[-] daddyjones@lemmy.world 1 points 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...

[-] Crion@lemmy.world 1 points 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 :)

[-] daddyjones@lemmy.world 1 points 7 months ago

Apparently the installed version is: 1.0_beta14

My config is here

[-] Crion@lemmy.world 2 points 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!

this post was submitted on 09 Apr 2024
8 points (90.0% liked)

Linux

8118 readers
59 users here now

Welcome to c/linux!

Welcome to our thriving Linux community! Whether you're a seasoned Linux enthusiast or just starting your journey, we're excited to have you here. Explore, learn, and collaborate with like-minded individuals who share a passion for open-source software and the endless possibilities it offers. Together, let's dive into the world of Linux and embrace the power of freedom, customization, and innovation. Enjoy your stay and feel free to join the vibrant discussions that await you!

Rules:

  1. Stay on topic: Posts and discussions should be related to Linux, open source software, and related technologies.

  2. Be respectful: Treat fellow community members with respect and courtesy.

  3. Quality over quantity: Share informative and thought-provoking content.

  4. No spam or self-promotion: Avoid excessive self-promotion or spamming.

  5. No NSFW adult content

  6. Follow general lemmy guidelines.

founded 1 year ago
MODERATORS