mirror of
https://github.com/ryanccn/flake.git
synced 2025-12-06 08:10:43 +01:00
feat: adopt XDG base directories
This commit is contained in:
parent
b1984a512c
commit
c6c59dd552
7 changed files with 40 additions and 24 deletions
|
|
@ -6,10 +6,12 @@ setopt auto_menu
|
|||
setopt complete_in_word
|
||||
setopt always_to_end
|
||||
|
||||
export HISTFILE="$XDG_STATE_HOME"/zsh/history
|
||||
compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION"
|
||||
|
||||
# configure completion styles
|
||||
zstyle ':completion:*' menu select
|
||||
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
|
||||
|
||||
zstyle ':completion:*' group-name \'\'
|
||||
|
||||
function take() {
|
||||
|
|
@ -17,17 +19,6 @@ function take() {
|
|||
cd "$1" || return 1
|
||||
}
|
||||
|
||||
function clean_vscode_workspace_storage() {
|
||||
for i in "$HOME/Library/Application Support/Code/User/workspaceStorage/"*; do
|
||||
if [ -f $i/workspace.json ]; then
|
||||
older="$(python3 -c "import sys, json; print(json.load(open(sys.argv[1], 'r'))['folder'])" $i/workspace.json 2>/dev/null | sed 's#^file://##;s/+/ /g;s/%\(..\)/\\x\1/g;')";
|
||||
if [ -n "$folder" ] && [ ! -d "$folder" ]; then
|
||||
echo "Removing workspace $(basename $i) for deleted folder $folder of size $(du -sh $i|cut -f1)"; rm -rfv "$i";
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# nix-your-shell
|
||||
eval "$(nix-your-shell zsh)"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue