1set -gx BAT_THEME "ansi"
2set -gx DFT_BACKGROUND "light"
3
4# XDG variables
5set -gx XDG_DATA_HOME "$HOME/.local/share"
6set -gx XDG_CONFIG_HOME "$HOME/.config"
7set -gx XDG_STATE_HOME "$HOME/.local/state"
8set -gx XDG_CACHE_HOME "$HOME/.cache"
9set -gx XDG_BIN_HOME "$HOME/.local/bin"
10set -gx XDG_BIN_DIR $XDG_BIN_HOME
11
12# Moving dotfiles around
13set -gx WINEPREFIX "$XDG_DATA_HOME"/wine
14set -gx WORKON_HOME "$XDG_DATA_HOME/virtualenvs"
15set -gx SQLITE_HISTORY "$XDG_CACHE_HOME"/sqlite_history
16set -gx BUNDLE_USER_CONFIG "$XDG_CONFIG_HOME"/bundle
17set -gx BUNDLE_USER_CACHE "$XDG_CACHE_HOME"/bundle
18set -gx BUNDLE_USER_PLUGIN "$XDG_DATA_HOME"/bundle
19set -gx NUGET_PACKAGES "$XDG_CACHE_HOME"/NuGetPackages
20set -gx DVDCSS_CACHE "$XDG_DATA_HOME"/dvdcss
21set -gx KDEHOME "$XDG_CONFIG_HOME"/kde
22set -gx GOPATH "$XDG_DATA_HOME"/go
23set -gx ZIM_HOME "$XDG_CONFIG_HOME"/.zim
24set -gx GHCUP_USE_XDG_DIRS "ishouldjustbeabletoexportthisnotsetit"
25set -gx NODE_PATH "$XDG_DATA_HOME/npm-packages/lib/node_modules"
26set -gx CARGO_HOME "$XDG_DATA_HOME"/cargo
27set -gx ASDF_DATA_DIR "$XDG_DATA_HOME/asdf"
28
29# Ruby crap
30rbenv init - | source
31fish_add_path "$HOME/.rbenv/versions/3.2.2/bin"
32
33# Android crap
34set -gx ANDROID_HOME "$XDG_DATA_HOME/Android"
35set -gx ANDROID_SDK_ROOT "$ANDROID_HOME"
36fish_add_path "$ANDROID_HOME/cmdline-tools/latest/bin"
37fish_add_path "$ANDROID_HOME/platform-tools"
38fish_add_path "$ANDROID_HOME/emulator"
39
40# Executable paths
41fish_add_path "$XDG_CONFIG_HOME/emacs/bin"
42fish_add_path "$GOPATH/bin"
43fish_add_path "$XDG_DATA_HOME/cargo/bin"
44fish_add_path "$HOME/.radicle/bin"
45fish_add_path "$HOME/.local/bin"
46fish_add_path "/usr/lib/kf6"
47fish_add_path "/usr/lib/kf5"
48fish_add_path "/usr/local/go/bin"
49fish_add_path "$XDG_CACHE_HOME/.bun/bin"
50
51# Additional preferences
52{{ if eq .chezmoi.hostname "sidhe" }}
53set -gx EDITOR "zed --wait"
54{{ else }}
55set -gx EDITOR "zeditor --wait"
56{{ end }}
57set -gx VISUAL "$EDITOR"
58set -gx MANPAGER "nvim +Man!"
59set -gx COLUMNS 80
60set -gx MANWIDTH 80
61set -gx CHARM_HOST "charm.secluded.site"
62set -gx RIPGREP_CONFIG_PATH "$HOME/.config/ripgreprc"
63set -gx RANGER_LOAD_DEFAULT_RC false
64
65# Disable dumb Python keyring integration
66set -gx PYTHON_KEYRING_BACKEND "keyring.backends.null.Keyring"
67
68set -gx UV_PUBLISH_TOKEN '{{ onepasswordRead "op://Private/PyPI/uv angmar" }}'
69
70# Authenticate to local Radicle (.xyz) node
71{{ if eq .chezmoi.hostname "angmar" }}
72set -gx RAD_PASSWORD '{{ onepasswordRead "op://Private/2ujzijel6ni3np2uj5k5syptzm/angmar" }}'
73{{ end }}
74{{ if eq .chezmoi.hostname "sidhe" }}
75set -gx RAD_PASSWORD '{{ onepasswordRead "op://Private/2ujzijel6ni3np2uj5k5syptzm/sidhe" }}'
76{{ end }}
77
78# Auth to SourceHut
79set -gx SRHT_TOKEN '{{ onepasswordRead "op://Private/SourceHut/token" }}'
80
81set -gx JIRA_API_TOKEN '{{ onepasswordRead "op://Private/Atlassian/jira key" }}'
82set -gx KAGI_API_KEY '{{ onepasswordRead "op://Shared/Kagi/api_key" }}'
83
84# LLM Crap
85set -gx OPENAI_API_KEY '{{ onepasswordRead "op://Private/OpenAI/api_keys/shell" }}'
86set -gx OPENROUTER_API_KEY '{{ onepasswordRead "op://Shared/OpenRouter/keys/shell" }}'
87set -gx OPENROUTER_KEY "$OPENROUTER_API_KEY"
88set -gx PARALLEL_API_KEY '{{ onepasswordRead "op://Private/Parallel.ai/api key" }}'
89set -gx GEMINI_API_KEY '{{ onepasswordRead "op://Private/Personal Google/gemini api" }}'
90set -gx LLM_GEMINI_KEY "$GEMINI_API_KEY"
91set -gx PERPLEXITY_API_KEY '{{ onepasswordRead "op://Private/nkhcb2h2ecfh26hksdgpw5txfu/api keys/CLI" }}'
92set -gx PERPLEXITY_LENSES '{{ onepasswordRead "op://Private/nkhcb2h2ecfh26hksdgpw5txfu/lenses/text" }}'
93set -gx ZAI_API_KEY '{{ onepasswordRead "op://Private/iqjxrmks3xqrrjrz5rosh3bagy/api keys/claude code" }}'
94set -gx OLLAMA_HOST '100.108.156.33:11434'
95
96# PATHs
97fish_add_path "$XDG_DATA_HOME/npm-packages/bin"
98
99# Guix
100set -gx GUIX_LOCPATH "$HOME/.guix-profile/lib/locale"
101set -gx GUIX_PROFILE "$HOME/.guix-profile"
102fish_add_path "$GUIX_PROFILE/bin"
103
104# ASDF configuration
105if test -z $ASDF_DATA_DIR
106 set _asdf_shims "$HOME/.asdf/shims"
107else
108 set _asdf_shims "$ASDF_DATA_DIR/shims"
109end
110
111if status is-interactive
112
113 {{ if ne .chezmoi.hostname "sidhe" }}
114 alias zed="zeditor"
115 alias task="go-task"
116 {{ end }}
117
118 # Bunch of aliases
119 alias wget="wget --hsts-file=\"$XDG_DATA_HOME/wget-hsts\""
120 alias svn="svn --config-dir $XDG_CONFIG_HOME/subversion"
121 alias ts="tailscale"
122 alias datetime="date +%Y-%m-%d_%H%M%S_%Z"
123 alias clip="xclip -selection clipboard"
124 alias send="rsync -amzzP"
125 alias bat="bat -n --tabs 2"
126 alias erase="shred -vzfun 32"
127 alias dl="yt-dlp --write-sub --write-auto-sub --sub-lang en --sub-format srt/best --convert-subs srt --embed-subs -o '%(upload_date)s %(title)s.%(ext)s'"
128 alias us="unsilence -t 15 -as 1.25"
129 alias sxiv="sxiv -p"
130 alias c="chezmoi"
131 alias t="tea"
132 alias j="just"
133 alias ls="lsd"
134 alias loghtml="llm logs -ceu | mdas -h | grep '\.html\$' | read path_to_response && xdg-open \"LLM Responses/\$path_to_response\" && echo \"Opened \$path_to_response\""
135 alias soft="ssh git.secluded.site"
136 alias g="git"
137
138 scheme set tomorrow
139 starship init fish | source
140 atuin init --disable-up-arrow fish | source
141 enable_transience
142end
143
144if status is-login
145 set -q SSH_AUTH_SOCK; or set -gx SSH_AUTH_SOCK "$XDG_RUNTIME_DIR/ssh-agent.socket"
146 ssh-add -l > /dev/null 2>&1
147 if test $status -ne 0
148 eval (ssh-agent -c -a "$SSH_AUTH_SOCK" > /dev/null)
149 echo "Spawned new ssh-agent. PID: $SSH_AGENT_PID"
150 end
151end
152
153# Do not use fish_add_path (added in Fish 3.2) because it
154# potentially changes the order of items in PATH
155if not contains $_asdf_shims $PATH
156 set -gx --prepend PATH $_asdf_shims
157end
158set --erase _asdf_shims