Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

is:issue is:open Antidot automatically overwrites antidot/env.sh but does not tell the user this #162

Open
magnus-ISU opened this issue Nov 22, 2021 · 2 comments

Comments

@magnus-ISU
Copy link

.. or instruct them of how to create their own rules in kvstore.json.

I propose we add some comments to the beginning of env.sh and alias.sh:

## WARNING: antidot manages this file internally and will overwrite it
## DO NOT EDIT THIS FILE YOURSELF
# To set your own environment variables, edit `antidot/kvstore.json` and add key-value pairs
# Something something please open a pull request if antidot does not know how to handle a dotfile that we can clean up

I would go further and say that env.sh and alias.sh have no reason to exist, because all the actual information about what to do is stored in kvstore.json as far as I can tell so far. A better implementation would be to have antidot init parse kvstore.json and produce the necessary information to stdout: this would enable supporting more non-POSIX shells, such as ion, more easily.

@magnus-ISU
Copy link
Author

To give more context, I have been trying to manage dotfiles manually myself for a while and already had the following variables set:

export XAUTHORITY="$XDG_CONFIG_HOME/Xauthority"
export XSERVERRC="$XDG_CONFIG_HOME/X11/xserverrc"
export MPLAYER_HOME="$XDG_CONFIG_HOME/mplayer"
export PYTHONSTARTUP="$XDG_CONFIG_HOME/python/startup"
export WGETRC="$XDG_CONFIG_HOME/wget/rc"
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc"

export PASSWORD_STORE_DIR="$XDG_DATA_HOME/password-store"
export CARGO_HOME="$XDG_DATA_HOME/cargo"
export RUSTUP_HOME="$XDG_DATA_HOME/rustup"
export GOPATH="$XDG_DATA_HOME/go"
export VAGRANT_HOME="$XDG_DATA_HOME"/vagrant
export VAGRANT_ALIAS_FILE="$XDG_DATA_HOME"/vagrant/aliases
export GNUPGHOME="$XDG_DATA_HOME"/gnupg

export CUDA_CACHE_PATH="$XDG_CACHE_HOME/nv"

I tried adding them to env.sh, made another rule from antidot, and all this got deleted.

@doron-cohen
Copy link
Owner

doron-cohen commented May 14, 2022

Thanks @magnus-ISU . I agree with the suggestion.

Furthermore, I suggest making these exports as antidot rules. I also want to allow custom user rules. Tell me what you think. Sorry for the delay btw

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
2 participants