bagex serves as an entrance for programs, it manages environment variables for the programs according to a configuration file. bagex takes an executab

blurgyy / bagex

submited by
Style Pass
2021-07-27 16:00:09

bagex serves as an entrance for programs, it manages environment variables for the programs according to a configuration file.

bagex takes an executable name as its argument, and tries to read its configuration from $XDG_CONFIG_HOME/bagex/config.toml if the environment variable XDG_CONFIG_HOME is set, otherwise it tries to read $HOME/.config/bagex/config.toml. Optionally use -c|--config-file to specify the configuration file to read. Example usage:

It is quite convenient to set a process' environment in a systemd service, but every time the environment has to change, one must run systemctl [--user] daemon-reload after changing the .service file, then call systemctl [--user] restart foo.service to update the running environment of the program.

bagex makes this process even more convenient by specifying the environment of a program in a separate config file, so that each time the environment is changed in bagex's config, only a systemctl [--user] restart foo.service has to be called.

Leave a Comment
Related Posts