Closed TheEdgeOfRage closed 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?
Oh, I didn't know you can have global ones. That would definitely be preferred then :D
How do I define it globally?
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.
Looking at it in a bit more detail:
config.<accessor>()
. I think that maybe this would be the best option here.pulsein.fontsize
, but if that is not found, use fontsize
- what do you think?If you prefer, I can put together a draft PR for those changes, as they are targeting the core quite a bit.
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?
An instance (the instance, actually) of Config is passed as the first parameter to init() of all modules, iirc. Does that help?
Looks good, thank you very much!
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