tobi-wan-kenobi / bumblebee-status

bumblebee-status is a modular, theme-able status line generator for the i3 window manager.
https://bumblebee-status.readthedocs.io/en/main/
MIT License
1.23k stars 228 forks source link

`start-minimized` breaks my statusbar #1011

Closed jonasbadstuebner closed 2 weeks ago

jonasbadstuebner commented 9 months ago

Bug Report

Description

Affected module: At least nic. Version used: latest git

#### How to reproduce Set something like ``` [core] modules = nic [module-parameters] nic.start-minimized = True ``` and you should get an error like `IndexError: list index out of range` at `blocks.extend(self.separator_block(module, module.widgets()[0]))` I tried to fix it, but when I added a check for it, my statusbar has a triangle that I cannot click or anything. **TL;DR:** I tried to fix it, but couldn't easily. ![grafik](https://github.com/tobi-wan-kenobi/bumblebee-status/assets/18399895/aaa85de3-8a14-4947-b740-81d929c8e41e) It's not very important for me, I just thought it would work.
tobi-wan-kenobi commented 9 months ago

Which version of bumblebee-status are you using?

With current git, I cannot reproduce this behaviour:

$ cat ~/.config/bumblebee-status.conf 
[core]
modules = nic
[module-parameters]
nic.start-minimized = True
bumblebee-status on  main via 🐍 v3.12.1 
$ ./bumblebee-status            
{"version": 1, "click_events": true}
[
[{"full_text": " lan enp1s0f1 down ", "color": "#aabbcc", "name": "nic", "instance": "nic::0", "_raw": "enp1s0f1 down", "_suffix": " ", "_prefix": " lan ", "align": null}],
[{"full_text": " lan enp1s0f1 down ", "color": "#aabbcc", "name": "nic", "instance": "nic::0", "_raw": "enp1s0f1 down", "_suffix": " ", "_prefix": " lan ", "align": null}],
jonasbadstuebner commented 9 months ago

Could you try

[core]
modules = eth:nic,wifi:nic
[module-parameters]
eth.include = eth0
eth.start-minimized = True

wifi.include = wlan0
wifi.start-minimized = True

please?

jonasbadstuebner commented 9 months ago

My config is more compley, I tried to give a minimal example and you are right, the one I provided first does work.

tobi-wan-kenobi commented 2 weeks ago

Closing, because I was unable to reproduce (and frankly, forgot about this ticket and it has timed out).

If this issue persists, I apologize, and please reopen the ticket & I will look at it asap.

jonasbadstuebner commented 2 weeks ago

Did you test it with the latest config I provided? The issue is with renaming the nic and trying to set the setting for the name, rather than the nic-module, I think.

tobi-wan-kenobi commented 2 weeks ago

Hey! Sorry, that one is on me, I totally overlooked that.

Might be a very easy problem: In the config you provided, the module name and the alias are reversed - it's always <module>:<alias>, not the other way round.

Can you please give that a try? And sorry again for taking so long to spot this!

And thanks for your patience with an issue that's almost a year old :)

tobi-wan-kenobi commented 2 weeks ago

I also checked your config on my machine with module <> alias switched, and it seems to work fine.

jonasbadstuebner commented 2 weeks ago

Ah, you are right, I think that one is on me. Thank you for having a look, can be closed. :+1: