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.22k stars 229 forks source link

Added a max_chars parameter to be able to control the widget width. #947

Closed arivarton closed 1 year ago

arivarton commented 1 year ago

Also moved the try block a bit further up to catch network errors.

tobi-wan-kenobi commented 1 year ago

Thanks a lot to the PR!

The "catching" changes look totally fine for me, regarding the max width: Would it maybe be easier to just give the module the "scrollable" decorator? That way, users can provide a width, and still see all content because the widget scrolls.

Alternatively, I think I would prefer a generic solution ("max-width", analogous to the existing "min-width")

I generally try to stear clear from options that change the size of a widget frequently, if possible, because I feel it makes the status bar very noisy.

Thank you very much again for giving your improvements back, I am looking forward to your thoughts on my suggestions above.

arivarton commented 1 year ago

I was experimenting with the scrollable decorator but didn't really get it to work as expected. Another issue there is that the date and time will scroll away when its moving, but I guess I can add the date and time in a separate widget and only scroll the text.

I will take another look at this.

arivarton commented 1 year ago

Thanks a lot to the PR!

The "catching" changes look totally fine for me, regarding the max width: Would it maybe be easier to just give the module the "scrollable" decorator? That way, users can provide a width, and still see all content because the widget scrolls.

Alternatively, I think I would prefer a generic solution ("max-width", analogous to the existing "min-width")

I generally try to stear clear from options that change the size of a widget frequently, if possible, because I feel it makes the status bar very noisy.

Thank you very much again for giving your improvements back, I am looking forward to your thoughts on my suggestions above.

I've made some changes to this pull request which should satisfy your specifications.

tobi-wan-kenobi commented 1 year ago

Looks good to me - and good catch that scrolling overrides the "every" specifier - I think that is a bug, actuall,.

Will look into that. Thank you!