{{- if (and (eq .chezmoi.os "linux") (eq .hosttype "desktop" "laptop")) }} # XDG directory settings have been already done in /home/inkch/.config/X11/xprofile {{- end }} set -x XDG_RUNTIME_DIR /run/user/{{ .chezmoi.uid }} set -x XDG_CONFIG_HOME "$HOME/.config" set -x XDG_CACHE_HOME "$HOME/.cache" set -x XDG_DATA_HOME "$HOME/.local/share" set -x XDG_DESKTOP_DIR "$HOME/vc/desk" set -x XDG_DOCUMENTS_DIR "$HOME/vc/docs" set -x XDG_DOWNLOAD_DIR "$HOME/dl" set -x XDG_MUSIC_DIR "$HOME/vc/audio" set -x XDG_PICTURES_DIR "$HOME/vc/pix" set -x XDG_VIDEOS_DIR "$HOME/vc/vids" set -x PATH $HOME/.local/bin $PATH # Editor if type -q nvim; set -x EDITOR 'nvim' else if type -q vim; set -x EDITOR 'vim' else set -x EDITOR 'vi' end # for 'man'. See below; # https://wiki.archlinux.org/title/Color_output_in_console # set -x LESSOPEN "| /usr/bin/source-highlight-esc.sh %s" set -x LESS_TERMCAP_md (printf "\e[01;31m") set -x LESS_TERMCAP_me (printf "\e[0m") set -x LESS_TERMCAP_se (printf "\e[0m") set -x LESS_TERMCAP_so (printf "\e[01;44;33m") set -x LESS_TERMCAP_ue (printf "\e[0m") set -x LESS_TERMCAP_us (printf "\e[01;32m") # for 'less' set -x LESS '-RI' set -x LESSHISTFILE '-' # nnn (filemanager) settings set -x NNN_CONTEXT_COLORS '4231' set -x NNN_BMS 'j:/mnt/hdd2;l:/mnt/hdd2/vids/films;m:/mnt/;h:/mnt/hdd/;d:~/dl;t:~/dl/torrent;.:~/.config' # python set -x PYTHONSTARTUP $XDG_CONFIG_HOME/pythonrc # ripgrep (rg) set -x RIPGREP_CONFIG_PATH $XDG_CONFIG_HOME/ripgreprc # xorg-xauth # This line will break some DMs. set -x XAUTHORITY "$XDG_RUNTIME_DIR/Xauthority" # xinit set -x XINITRC "$XDG_CONFIG_HOME/X11/xinitrc" set -x XSERVERRC "$XDG_CONFIG_HOME/X11/xserverrc" # nodejs set -x NODE_REPL_HISTORY $XDG_CACHE_HOME/node_repl_history set -x NPM_CONFIG_USERCONFIG $XDG_CONFIG_HOME/npm/npmrc set -x PATH $XDG_DATA_HOME/npm/bin $PATH # nvm # set -x NVM_DIR $XDG_DATA_HOME/nvm # volta set -x VOLTA_HOME $XDG_DATA_HOME/volta set -x PATH "$VOLTA_HOME/bin" $PATH # python & pylint set -x PYLINTHOME "$XDG_CACHE_HOME"/pylint # golang set -x GOPATH "$XDG_DATA_HOME/go" set -x PATH $GOPATH/bin $PATH # Rust set -x RUSTUP_HOME $XDG_DATA_HOME/rustup set -x CARGO_HOME $XDG_DATA_HOME/cargo set -x PATH $PATH $CARGO_HOME/bin # Parallel set -x PARALLEL_HOME $XDG_CACHE_HOME/parallel # source-highlight set -x SOURCE_HIGHLIGHT_DATADIR /usr/share/source-highlight # `pass` command set -x PASSWORD_STORE_DIR $XDG_DATA_HOME/password-store # ~/.rnd -> $XDG_CACHE_HOME/rnd set -x RANDFILE $XDG_CACHE_HOME/rnd # gpg (gnupg) set -x GNUPGHOME $XDG_DATA_HOME/gnupg # Filezilla set -x FZ_DATADIR $XDG_DATA_HOME/filezilla # my own scripts set -x PATH $XDG_DATA_HOME/myscripts $PATH # john the ripper set -x JOHN $XDG_DATA_HOME/john # bat (cat clone written in Rust) if type -q bat; # set -x BAT_THEME "hybrid" set -x BAT_THEME "base16" set -x BAT_PAGER "less -RFI" set -x PAGER 'bat -p' end if type -q fzf; set -x FZF_DEFAULT_OPTS '' set -xa FZF_DEFAULT_OPTS --height=50% set -xa FZF_DEFAULT_OPTS --layout=reverse set -xa FZF_DEFAULT_OPTS --bind=ctrl-k:kill-line end if type -q sk; set -x SKIM_DEFAULT_OPTIONS '' set -xa SKIM_DEFAULT_OPTIONS --height=50% set -xa SKIM_DEFAULT_OPTIONS --layout=reverse set -xa SKIM_DEFAULT_OPTIONS --bind=ctrl-k:kill-line end if type -q sdcv; set -x STARDICT_DATA_DIR "$XDG_DATA_HOME/stardict" end if type -q elinks; set -x ELINKS_CONFDIR "$XDG_CONFIG_HOME/elinks" end if type -q docker; set -x DOCKER_CONFIG "$XDG_CONFIG_HOME/docker" end if type -q gem; set -x PATH "$XDG_DATA_HOME/gem/ruby/2.7.0/bin" $PATH end if test -f "$XDG_CONFIG_HOME"/mpd/mpd.conf; set -x MPD_HOST (grep -n --color=always '^bind_to_address' $XDG_CONFIG_HOME/mpd/mpd.conf | awk -F' ' '{print $2}' | sed 's/"//g') end if type -q vidir; set -x VIDIR_EDITOR_ARGS '-c :set nolist | :set ft=vidir-ls' end if type -q stack; # Haskell set -x STACK_ROOT "$XDG_DATA_HOME"/stack end if type -q hledger; set -x LEDGER_FILE "$HOME/vc/accounting/hledger/main.journal" end {{- if (and (eq .chezmoi.os "linux") (eq .hosttype "desktop" "laptop")) }} if test -d "$XDG_DATA_HOME/flatpak/exports/bin" set -ax PATH "$XDG_DATA_HOME/flatpak/exports/bin" else if test -d "$HOME/.local/share/flatpak/exports/bin" set -ax PATH "$HOME/.local/share/flatpak/exports/bin" end if test -d /var/lib/flatpak/exports/bin set -ax PATH "/var/lib/flatpak/exports/bin" end if type -q calibre; set -x CALIBRE_USE_DARK_PALETTE 1 end if type -q ksshaskpass set -x SSH_ASKPASS (which ksshaskpass) set -x SUDO_ASKPASS (which ksshaskpass) end if type -q gpodder set -x GPODDER_HOME "$XDG_CONFIG_HOME/gpodder" end {{- end }} {{- if (eq .chezmoi.hostname "arch") }} if type -q ollama set -x OLLAMA_HOST "10.0.2.1:11434" end if type -q gpodder set -x GPODDER_DOWNLOAD_DIR "/mnt/hdd/gpodder" end {{- end }}