fix: MacOS paths

This commit is contained in:
Peter 2023-10-25 08:25:33 +02:00
parent 769e7570ae
commit bdbbafaf2a
No known key found for this signature in database
2 changed files with 31 additions and 26 deletions

View file

@ -1,24 +1,17 @@
# Directories {{{ # # Wayland #
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
export XDG_CACHE_HOME=$HOME/.cache
export XDG_DATA_HOME=$HOME/.local/share
export XDG_STATE_HOME=$HOME/.local/state
# }}} Directories #
# Wayland {{{{ #
export _JAVA_AWT_WM_NONREPARENTING=1 export _JAVA_AWT_WM_NONREPARENTING=1
# }}}} Wayland # Wayland
# Libvirt {{{{ # Libvirt
export LIBVIRT_DEFAULT_URI="qemu:///session" export LIBVIRT_DEFAULT_URI="qemu:///session"
# }}}} Libvirt # # Libvirt #
# dotnet {{{ # # dotnet #
export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
# }}} dotnet # # dotnet #
# Env Programs {{{ # # Env Programs #
export EDITOR=nvim export EDITOR=nvim
export BROWSER=/usr/bin/firefox export BROWSER=/usr/bin/firefox
export GIT_EDITOR=nvim export GIT_EDITOR=nvim
@ -27,14 +20,14 @@ export TERMINAL=alacritty
export SOPS_GPG_EXEC=gpg2 export SOPS_GPG_EXEC=gpg2
export CHROME_EXECUTABLE=/usr/bin/chromium export CHROME_EXECUTABLE=/usr/bin/chromium
export TERM="xterm-256color" export TERM="xterm-256color"
# }}} Env Programs # # Env Programs #
# bat settings {{{ # # bat settings #
export BAT_THEME="Solarized (dark)" export BAT_THEME="Solarized (dark)"
export BAT_STYLE="full" export BAT_STYLE="full"
# }}} bat # # bat #
# fzf settings {{{ # # fzf settings #
_fzf_compgen_path() { _fzf_compgen_path() {
fd --hidden --follow --exclude ".git" --exclude ".wine" . "$1" fd --hidden --follow --exclude ".git" --exclude ".wine" . "$1"
} }
@ -49,15 +42,15 @@ export FZF_TMUX_HEIGHT=30\%
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export FZF_ALT_C_COMMAND='command cat <(fd -t d --exclude .git --exclude .wine) <(fd -t d --hidden --follow --exclude .git --exclude .wine . ~)' export FZF_ALT_C_COMMAND='command cat <(fd -t d --exclude .git --exclude .wine) <(fd -t d --hidden --follow --exclude .git --exclude .wine . ~)'
export FZF_ALT_C_OPTS="--preview '(highlight -O ansi -l {} 2> /dev/null || cat {} || tree -C {}) 2> /dev/null | head -200'" export FZF_ALT_C_OPTS="--preview '(highlight -O ansi -l {} 2> /dev/null || cat {} || tree -C {}) 2> /dev/null | head -200'"
# }}} fzf settings # # fzf settings #
# History {{{ # # History #
[ -z "$HISTFILE" ] && HISTFILE="$HOME/.cache/zsh/history" [ -z "$HISTFILE" ] && HISTFILE="$HOME/.cache/zsh/history"
[ ! -d "$(dirname "$HISTFILE")" ] && mkdir -p "$(dirname "$HISTFILE")" [ ! -d "$(dirname "$HISTFILE")" ] && mkdir -p "$(dirname "$HISTFILE")"
export HISTSIZE=10000 export HISTSIZE=10000
export SAVEHIST=10000 export SAVEHIST=10000
# }}} History # # History #
# ZSH options {{{{ # # ZSH options #
setopt autocd setopt autocd
# }}}} ZSH options # # ZSH options #

View file

@ -1,4 +1,16 @@
export ZSH_CACHE_DIR=$HOME/.config/zsh/cache {{- if eq .chezmoi.os "darwin" }}
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
export XDG_CACHE_HOME="$HOME/Library/Caches"
export XDG_DATA_HOME="$HOME/Library"
export XDG_STATE_HOME="$HOME/Library/state"
{{- else if eq .chezmoi.os "linux" }}
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
export XDG_CACHE_HOME=$HOME/.cache
export XDG_DATA_HOME=$HOME/.local/share
export XDG_STATE_HOME=$HOME/.local/state
{{end}}
export ZSH_CACHE_DIR="$XDG_CACHE_HOME/zsh"
{{- if eq .chezmoi.os "darwin" }} {{- if eq .chezmoi.os "darwin" }}
export PATH="$PATH:/opt/homebrew/bin" export PATH="$PATH:/opt/homebrew/bin"
@ -48,9 +60,9 @@ fi
export PATH="$PATH:$HOME/.dotnet/tools" export PATH="$PATH:$HOME/.dotnet/tools"
# Znap # Znap
export ZNAP_HOME=$HOME/.local/share/znap export ZNAP_HOME="$XDG_DATA_HOME/znap"
for file in $HOME/.config/zsh/*.zsh; do for file in $XDG_CONFIG_HOME/zsh/*.zsh; do
source "$file" source "$file"
done done