JakobGM / astrality

Astrality - A modular and dynamic configuration file manager
https://astrality.readthedocs.io
MIT License
98 stars 3 forks source link

Allow enabling single modules from the CLI #14

Closed JakobGM closed 6 years ago

JakobGM commented 6 years ago

You should be able to run astrality --module MODULE1 MODULE2 MODULE3 in order to quickly run specific module(s). That way you could check out some other astrality module by running astrality -m github::jakobgm/polybar in order to effortlessly try modules created by others.

It should not be too hard to implement. You would need to

The testing strategy could be to unit-test astrality.astrality.main while monkey patching the return value of os.environ['ASTRALITY_CONFIG_HOME'] to some configuration directory which contains a module with some easily testable side-effect. Perhaps run: shell: 'touch touched.tmp'? Monkey patching os.environ is explained here.

Is this something you would like to implement, @sshashank124?

sshashank124 commented 6 years ago

So the astrality --modules process should run independently of a potentially already running main astrality process? Yes I can work on this

JakobGM commented 6 years ago

Yes, I think that makes the most sense. Let's say I have already Astrality running in the background. Then I would like to test out a new module. I think that should not kill my already existing background process.

JakobGM commented 6 years ago

I did some refactoring recently which made this change quite easy, so I took the liberty to implement the feature myself ;)