# Shelly A helpful tool to make managing shell environments a little easier. With some magic defaults and an simple mechanism for overriding them. ## Usage To just use it you set the environment variable `$SHELLY` to the directory that shelly is and source it. It is important to realise that shelly is resposible for configuring `$XDG_CONFIG_HOME` so I would recommend you only use `${HOME}` to reference your home directory and enter the rest of the path verbatim. ### Example ```bash export SHELLY="${HOME}/.config/shelly" source "${SHELLY}/shelly.sh" ``` ## Configuration The git repo for shelly is configured to ignore most of what is in overrides.d, keeping just the directory structure. Files will be loaded in the following manner: First it loads the default program choices, You can inspect this file to see what choices I make. To override them you can add files to `overrides.d/programs` All files must have the extension `.sh` to be detected. After this the XDG shenanigans are performed, again inspect the file to see what it does. Overrides go in `overrides.d/XDG` Next is program_config, same rules. Then Bemenu, again same rules. Next is Path. Path is a little more fun, to make path somewhat idempotent a function called `updatepath` is defined. In your override files you should use this function to add to your path. The function is called like this `updatepath ` where `TOP` should be either 1 or 0, 1 meaning add the new `PATHENTRY` at the front of the path. Otherwise it adds it to the bottom. The function _only_ adds a new entry to `PATH` if it isn't already there, this ensures that session in sessions don't get more path entries than they need.