diff --git a/.config/shell/functions b/.config/shell/functions index baa708d..01c24a0 100644 --- a/.config/shell/functions +++ b/.config/shell/functions @@ -290,7 +290,7 @@ smv() { test -w "$1" && test -w "$(dirname $2)" && mv "$@" || sudo mv "$@" } -# Rename the file, keep it in its directory +# Rename the file inside its directory mvf() { smv "$1" "$(dirname $1)/$2" } @@ -300,7 +300,7 @@ mvln() { file=$(test -f "$1" && echo 1 || echo 0) if test -d $1; then mkdir -p "$2" - mv -T $1 $2 + mv -vT $1 $2 else mv -v $1 $2 fi @@ -311,6 +311,7 @@ mvln() { # Move into XDG_DATA_HOME or so mvx() { mvln "$1" "${2:-$XDG_DATA_HOME}/${1#.}" + yadm add "$1" ".config/$1" } diff --git a/.local/bin/scripts/clean b/.local/bin/scripts/clean index c65d0a7..9e1c8e6 100755 --- a/.local/bin/scripts/clean +++ b/.local/bin/scripts/clean @@ -4,7 +4,7 @@ typeset -A _clean_map _clean_map=([h]=$XDG_CACHE_HOME [t]=/var/tmp [l]=/var/log [c]=/var/cache) # Directories to always clean -_clean_folders=(~/.ant ~/.autopsy ~/.cargo ~/.electron-gyp ~/.gradle ~/.konan ~/.nix-defexpr ~/.node-gyp ~/.npm ~/.nv ~/.parallel ~/.stack ~/.yarn +_clean_folders=(~/.ant ~/.autopsy ~/.bundle ~/.cache ~/.cargo ~/.docker ~/.electron ~/.electron-gyp ~/.gradle ~/.gradle-kotlin-dsl ~/.hex ~/.java ~/.kscript ~/.konan ~/.m2 ~/.nix-defexpr ~/.node-gyp ~/.npm ~/.nv ~/.openjfx ~/.parallel ~/.stack ~/.surf ~/.texlive ~/.yarn luametatex-cache ~/.lesshst ~/.yarnrc) diff --git a/.zprofile b/.zprofile index a44dd1d..c5272e0 100644 --- a/.zprofile +++ b/.zprofile @@ -33,6 +33,7 @@ export BUNDLE_USER_CONFIG="$XDG_CONFIG_HOME"/bundle export BUNDLE_USER_CACHE="$XDG_CACHE_HOME"/bundle export BUNDLE_USER_PLUGIN="$XDG_STATE_HOME"/bundle +export LESSHISTFILE="$XDG_STATE_HOME"/lesshst export KSCRIPT_CACHE_DIR="$XDG_CACHE_HOME"/kscript # Java & Android @@ -56,7 +57,7 @@ export CONFIG_SHELLS="$XDG_CONFIG_HOME/shell" # environment which nvim >/dev/null && export EDITOR='nvim' || export EDITOR='vim' export LESS="--RAW-CONTROL-CHARS --ignore-case --LONG-PROMPT --jump-target=5 $(test $(less --version | head -1 | cut -f2 -d' ') -ge 590 && echo --incsearch)" -export IGNOREDIRS_PURE="-x .sync -x .stfolder -x .gradle -x dist_newstyle -x node_modules -x generated -x .cache -x *Cache -x .local/cache -x .cpan" +export IGNOREDIRS_PURE="-x .sync -x .stfolder -x .gradle -x dist_newstyle -x node_modules -x generated -x .cache -x *Cache -x .local/cache -x .local/state -x share/JetBrains -x share/Zeal -x share/syncthing -x .cpan" export IGNOREDIRS="-x dev -x *build -x .git -x .idea -x out -x cache -x Partitions $IGNOREDIRS_PURE" # red stderr test -f "/usr/lib/libstderred.so" && export LD_PRELOAD="/usr/lib/libstderred.so${LD_PRELOAD:+:$LD_PRELOAD}"