by quicklime · 3y ago · 0 comments
> Easier to share configuration settings
I want to share my nvim config between both my home Linux machine and my Mac at work, but I don’t want to share my config for gnome and its apps. So now I’ve got to maintain a script to go one more subdirectory deep to pick which dotfiles to sync and which to ignore...
> Easier to temporarily ignore the config > It is easiest to set XDG_CONFIG_HOME=/tmp/dir
This is such an unreliable way to do it, even within the xdg world. What about stuff in ~/.local/share? It’s a lot easier and more reliable to just set HOME=$(mktemp -d)
Personally when I’m trying to start from a clean profile, I find it much easier to just go and blow away ~/.mozilla than to go and surgically remove .config/epiphany, .local/share/epiphany, .cache/epiphany, and whatever gconf (or gsettings or whatever windows registry clone we’ve got now) settings it’s got.
i want to mess up with wine, now I just backup ~/.wine, do whatever, restore.
With split folders, i'd have to backup a bunch of folders (.config/wine, .local/share/wine, .local/lib/wine or wherever the files, registry, dosdevices and other stuff would be put).
You can set WINEPREFIX to use a non-default prefix path (other than `~/.wine`).
Note that the prefix doesn't contain everything that wine spills all over your home. It adds (XDG `.desktop`) launchers & menu/desktop shortcuts, file type associations, icons, etc. to the usual locations.
find ~ -type d -name "?wine" -exec cp -r "{}" /path/to/my/wine/backup/ \;```
*
!nvim/
!dunst/
!i3/
```
Then you have a whitelist which is clearly not that hard to maintain
For the cache, the opposite argument is just as true:
If I want to clear cache from everything to save space, I can just `rm -rf ~/.cache` instead. And this case is a lot more common than wanting to "start from a clean profile" :/
But can you? Did you really close all the apps using ~/.cache? What if some app is just doing some cleanup operation, moves a bunch of stuff to cache, and the files are missing now? Did you just delete android studio cache in the middle of a compile?
You can also make a script like your .config, but it's called "clear_cache.sh", where you hardcore a few paths you usually clean manually.