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

Allow adjusting the fontsize of the pulsectl default device popup #986

Closed TheEdgeOfRage closed 10 months ago

TheEdgeOfRage commented 10 months ago

I've recently started using the pulsectl tk popup to pick the default device and one annoying thing is that the default font size is way too small for me, so I added basic support for changing it. I'm not sure if this is a good way to implement it, let me know if not :)

Edit: I just remembered that I should probably also update the docs :sweat_smile: I'll try to get around to that later today after work

tobi-wan-kenobi commented 10 months ago

Nice addition, thank you very much! Great to read from you again!

I think eventually, the best option probably would be having this as global (module independent) parameter. What do you hink?

TheEdgeOfRage commented 10 months ago

Oh, I didn't know you can have global ones. That would definitely be preferred then :D

How do I define it globally?

tobi-wan-kenobi commented 10 months ago

Those are the parameters defined outside the modules (in config.py, i think, can't remember for sure and don't have a pc handy)

I think popup should then have access to that via a config object.

tobi-wan-kenobi commented 10 months ago

Looking at it in a bit more detail:

If you prefer, I can put together a draft PR for those changes, as they are targeting the core quite a bit.

TheEdgeOfRage commented 10 months ago

Sorry, I haven't had much time these days to finish this. I've removed the code from the pulsectl module and I agree with your third point that it should ideally all be in config and the popup module. The issue I'm having is that config is a Class definition, but the instance is only available in the main file. Would it make sense to have config be a singleton that can be imported from other modules?

tobi-wan-kenobi commented 10 months ago

An instance (the instance, actually) of Config is passed as the first parameter to init() of all modules, iirc. Does that help?

tobi-wan-kenobi commented 10 months ago

Looks good, thank you very much!