shelly/XDG_shenanigans.sh
Robert Morrison 9eb9dd90f7
HELL COMMIT
Just get it all updated. make shelly a thing
2024-02-19 17:11:31 +00:00

87 lines
2.9 KiB
Bash

#!/bin/sh
###########################
# XDG shenanigans
###########################
# - The XDG basedirs standard sets out where programs should put their
# - files. Unfortunately there are programs that ignore this and just dump shit
# - inside your home directory. This SUCKS so bad.
# - Luckily you can actually configure a lot of those programs with Environment variables
# - Here I do the best I can for what I have installed. (you may want to change things here)
# - You can use the tool xdg-ninja https://github.com/b3nj5m1n/xdg-ninja to scan your home folder
# - and find things to add here.
# XDG Folders.
# - First we need to explicitly place where these folders are on our system
# - They can go anywhere (in your home directory). but these are the standard paths.
export XDG_CONFIG_HOME="$HOME"/.config
export XDG_DATA_HOME="$HOME"/.local/share
export XDG_CACHE_HOME="$HOME"/.cache
export XDG_STATE_HOME="$HOME"/.local/state
# Applications
# - This section is likely to be _VERY_ ugly looking.
# - Generally the only comment will be saying what is being moved.
# - I will also attempt to keep this in alphabetical order
# android-studio
export ANDROID_HOME="$XDG_DATA_HOME"/android
export ANDROID_USER_HOME="$ANDROID_HOME"
export ANDROID_AVD_HOME="$ANDROID_HOME/avd"
# Cabal
export CABAL_CONFIG="$XDG_CONFIG_HOME"/cabal/config
export CABAL_DIR="$XDG_DATA_HOME"/cabal
# cargo
export CARGO_HOME="$XDG_DATA_HOME"/cargo
# Cuda cache
export CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nv
# dotnet snap - this might be a me-only thing?
## Provided by PORTAGE
# export DOTNET_ROOT="$HOME/.local/opt/dotnet"
# gem cache
export GEM_SPEC_CACHE="${XDG_CACHE_HOME}"/gem
# gem
export GEM_HOME="${XDG_DATA_HOME}"/gem
# GHCUP
export GHCUP_USE_XDG_DIRS=1
# GNUPG
export GNUPGHOME="$XDG_DATA_HOME"/gnupg
# go
export GOPATH="$XDG_DATA_HOME"/go
# Gradle
export GRADLE_USER_HOME="$XDG_DATA_HOME"/gradle
# GTK 2
export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc
# jupyter
export JUPYTER_CONFIG_DIR="$XDG_CONFIG_HOME"/jupyter
# kde
export KDEHOME="$XDG_DATA_HOME"/kde
# Kodi
export KODI_DATA="$XDG_DATA_HOME"/kodi
# Less History
export LESSHISTFILE="$XDG_CACHE_HOME"/less/history
# npm
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc
# NuGet
export NUGET_PACKAGES="$XDG_CACHE_HOME"/NuGetPackages
# OPAM
export OPAMROOT="$XDG_DATA_HOME/opam"
# Parallel
export PARALLEL_HOME="$XDG_CONFIG_HOME"/parallel
# Pass
export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass
# pylint
export PYLINTHOME="${XDG_CACHE_HOME}"/pylint
# Python history
export PYTHONSTARTUP="${XDG_CONFIG_HOME}/python/pythonrc"
# Rustup
export RUSTUP_HOME="$XDG_DATA_HOME"/rustup
# Stack
export STACK_ROOT="$XDG_DATA_HOME"/stack
# TERMINFO
export TERMINFO="$XDG_DATA_HOME"/terminfo
export TERMINFO_DIRS="$XDG_DATA_HOME"/terminfo:/usr/share/terminfo
# wine
export WINEPREFIX="$XDG_DATA_HOME"/wine
# XCURSOR
export XCURSOR_PATH=/usr/share/icons:${XDG_DATA_HOME}/icons