okraits / j4-make-config

Universal theme switcher and config generator for the i3 wm
http://www.okraits.de/index.php?section=projects&page=j4-make-config
185 stars 22 forks source link

remove j4-make-config command from rc file #7

Closed ThomasFeher closed 7 years ago

ThomasFeher commented 9 years ago

In order to make the config file portable to different machines with different location where j4-make-config is installed, only the actual arguments should be stored in the configuration file.

This commit also cares about old style rc-files containing the j4-make-config command including its absolute path and deletes it properly.

okraits commented 9 years ago

Hi Thomas, i agree that for using the same rc-file on several machines j4-make-config shouldn't store the full path. On the other hand this would require that you add the j4-make-config script to your PATH because otherwise something like source $HOME/.j4-make-config.rc would not work. And i wonder if this breaks the functionality for some people. Additionally, if you add host-specific configurations parts with -a, your rc file is different on several machines anyway.

What do you think?

ThomasFeher commented 9 years ago

You are probably right. I haven't used j4-make-config to add host-specific configurations yet. On the other hand it seems rather unusual to have full path stored in a config file, at least I haven't seen it before. It is ok for me to use my forked version for now. As soon as I need host-specific configurations, I will have to re-think my configuration scheme anyway.

The more I think about it, the more I like the idea of having several config. files in my config repository and using a host-specific j4-make-config.rc that has to be created once on each machine to include the appropriate one.

okraits commented 9 years ago

I'm still undecided on this one. For me the best solution would be to store the exact command string which was used. But unfortunately sys.argv returns the expanded full path. I would go ahead and store just the name of the actual script in the config file but i don't want to break people's configurations. I think you should try out host-specific config files. This way, you can distribute a main configuration on several machines and still have host-specific configuration options, independent of the commandline stored in the configuration file.

okraits commented 7 years ago

Closing this for now.