doron-cohen / antidot

Cleans up your $HOME from those pesky dotfiles
MIT License
309 stars 18 forks source link

`~/.gtkrc-2.0` is being created anyway #264

Open she11sh0cked opened 2 months ago

she11sh0cked commented 2 months ago

For some reason my setup seems to ignore the environment variable GTK2_RC_FILES. Instead it creates the file anew everytime I boot my PC. I'm running KDE Plasma 6, so maybe they don't respect the environment variable? antidot init is being called from .bashrc and .zshrc.

~ 
❯ antidot init
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-/home/she11sh0cked/.config}"
export XDG_CACHE_HOME="${XDG_CACHE_HOME:-/home/she11sh0cked/.cache}"
export XDG_DATA_HOME="${XDG_DATA_HOME:-/home/she11sh0cked/.local/share}"

if [ -f "/home/she11sh0cked/.local/share/antidot/env.sh" ]; then source "/home/she11sh0cked/.local/share/antidot/env.sh"; fi
if [ -f "/home/she11sh0cked/.local/share/antidot/alias.sh" ]; then source "/home/she11sh0cked/.local/share/antidot/alias.sh"; fi

~ 
❯ cat .local/share/antidot/env.sh 
export npm_config_cache="${XDG_CACHE_HOME}/npm"
export CARGO_HOME="${XDG_DATA_HOME}/cargo"
export GOPATH="${XDG_DATA_HOME}/go"
export GTK2_RC_FILES="${XDG_CONFIG_HOME}/gtk-2.0/gtkrc"
export HISTFILE="${XDG_CACHE_HOME}/bash/history"

~ 
❯ antidot clean
Rule gtk2:
  MOVE   /home/she11sh0cked/.gtkrc-2.0 → /home/she11sh0cked/.config/gtk-2.0/gtkrc
  EXPORT GTK2_RC_FILES="${XDG_CONFIG_HOME}/gtk-2.0/gtkrc"
? Apply rule gtk2? Yes
WARNING: Failed to run rule gtk2: Destination path /home/she11sh0cked/.config/gtk-2.0/gtkrc already exists

Cleanup finished - run eval "$(antidot init)" to take effect
doron-cohen commented 2 months ago

Hey, Are you calling antidot init or $(antidot init)? The first will just print that script. The second will also evaluate it which is required for it to take effect in your shell

she11sh0cked commented 2 months ago

I let it evaluate :) https://github.com/she11sh0cked/dotfiles/blob/3ad0c303a07e79558be65dc6713d7ca5a81631b9/.zshrc#L2