refactor: simplify fish prompt and configs

This commit is contained in:
mitchell 2026-04-13 14:33:48 -04:00
parent fddae3ba36
commit 7da5ead1ed
32 changed files with 139 additions and 1156 deletions

View file

@ -0,0 +1,20 @@
if status is-interactive
alias q exit
alias cl clear
alias ls lsd
alias rcp 'rsync -aP'
alias ssh-rm 'ssh-keygen -f ~/.ssh/known_hosts -R'
alias age-p 'age --armor --passphrase'
alias age-d 'age --decrypt --identity ~/.secrets/id_ed25519'
alias age-e 'age --armor --recipient (cat ~/.secrets/id_ed25519.pub)'
alias age-k 'age --decrypt --identity ~/.secrets/id_ed25519 ~/.secrets/age_keys.age'
alias kp 'keepassxc-cli show -k ~/.secrets/mjfs_keepass_key_file ~/.passwords/mjfs.kdbx'
alias fwl 'sudo firewall-cmd'
switch (uname)
case Linux
alias sctl 'sudo systemctl'
alias uctl 'systemctl --user'
alias bctl bluetoothctl
end
end

View file

@ -0,0 +1,34 @@
set -gx EDITOR nvim
set -gx BROWSER firefox
set -gx DIFFPROG delta
set -gx FZF_CTRL_T_COMMAND 'fd --type f --type d --hidden --exclude ".git/"'
set -gx FZF_DEFAULT_COMMAND 'fd --type f --type d --hidden --exclude ".git/"'
set -gx FZF_ALT_C_COMMAND 'fd --type d --hidden --exclude ".git/"'
set -gx GOPATH $HOME/code/go
set -gx GOBIN $GOPATH/bin
set -gx BUN_INSTALL $HOME/.bun
set -gx LIBVIRT_DEFAULT_URI 'qemu:///system'
if test (uname) = Darwin
set -gx ANDROID_HOME $HOME/Library/Android/Sdk
else
set -gx ANDROID_HOME $HOME/Android/Sdk
end
set -gx PYENV_ROOT $HOME/.pyenv
fish_add_path $GOBIN \
$HOME/.local/bin \
$HOME/.pub-cache/bin \
$HOME/code/scripts \
$HOME/code/flutter/bin \
$HOME/.cargo/bin \
$HOME/.dotnet/tools \
$BUN_INSTALL/bin \
$PYENV_ROOT/bin \
$ANDROID_HOME/emulator \
$ANDROID_HOME/platform-tools

View file

@ -1,14 +0,0 @@
# This file was created by fish when upgrading to version 4.3, to migrate
# the 'fish_key_bindings' variable from its old default scope (universal)
# to its new default scope (global). We recommend you delete this file
# and configure key bindings in ~/.config/fish/config.fish if needed.
set --global fish_key_bindings fish_vi_key_bindings
# Prior to version 4.3, fish shipped an event handler that runs
# `set --universal fish_key_bindings fish_default_key_bindings`
# whenever the fish_key_bindings variable is erased.
# This means that as long as any fish < 4.3 is still running on this system,
# we cannot complete the migration.
# As a workaround, erase the universal variable at every shell startup.
set --erase --universal fish_key_bindings

View file

@ -1,46 +1,38 @@
# This file was created by fish when upgrading to version 4.3, to migrate
# theme variables from universal to global scope.
# Don't edit this file, as it will be written by the web-config tool (`fish_config`).
# To customize your theme, delete this file and see
# help interactive#syntax-highlighting
# or
# man fish-interactive | less +/^SYNTAX.HIGHLIGHTING
# for appropriate commands to add to ~/.config/fish/config.fish instead.
# See also the release notes for fish 4.3.0 (run `help relnotes`).
set --global fish_color_autosuggestion 727169 brblack
set --global fish_color_cancel -r
set --global fish_color_command 957FB8 magenta
set --global fish_color_comment 727169 brblack
set --global fish_color_cwd green
set --global fish_color_cwd_root red
set --global fish_color_end FF9E64 brred
set --global fish_color_error C34043 red
set --global fish_color_escape D27E99 brmagenta
set --global fish_color_history_current --bold
set --global fish_color_host normal
set --global fish_color_host_remote yellow
set --global fish_color_keyword D27E99 brmagenta
set --global fish_color_normal DCD7BA normal
set --global fish_color_operator 7AA89F cyan
set --global fish_color_param DCD7BA normal
set --global fish_color_quote C0A36E yellow
set --global fish_color_redirection 76946A green
set --global fish_color_search_match --background=2D4F67 --background=brcyan
set --global fish_color_selection --background=2D4F67 --background=brcyan
set --global fish_color_status red
set --global fish_color_user brgreen
set --global fish_color_valid_path --underline
set --global fish_pager_color_background
set --global fish_pager_color_completion DCD7BA normal
set --global fish_pager_color_description 727169 brblack
set --global fish_pager_color_prefix 957FB8 magenta
set --global fish_pager_color_progress 727169 brblack
set --global fish_pager_color_secondary_background
set --global fish_pager_color_secondary_completion
set --global fish_pager_color_secondary_description
set --global fish_pager_color_secondary_prefix
set --global fish_pager_color_selected_background -r
set --global fish_pager_color_selected_completion
set --global fish_pager_color_selected_description
set --global fish_pager_color_selected_prefix
if status is-interactive
set --global fish_color_autosuggestion 727169 brblack
set --global fish_color_cancel -r
set --global fish_color_command 957FB8 magenta
set --global fish_color_comment 727169 brblack
set --global fish_color_cwd green
set --global fish_color_cwd_root red
set --global fish_color_end FF9E64 brred
set --global fish_color_error C34043 red
set --global fish_color_escape D27E99 brmagenta
set --global fish_color_history_current --bold
set --global fish_color_host normal
set --global fish_color_host_remote yellow
set --global fish_color_keyword D27E99 brmagenta
set --global fish_color_normal DCD7BA normal
set --global fish_color_operator 7AA89F cyan
set --global fish_color_param DCD7BA normal
set --global fish_color_quote C0A36E yellow
set --global fish_color_redirection 76946A green
set --global fish_color_search_match --background=2D4F67 --background=brcyan
set --global fish_color_selection --background=2D4F67 --background=brcyan
set --global fish_color_status red
set --global fish_color_user brgreen
set --global fish_color_valid_path --underline
set --global fish_pager_color_background
set --global fish_pager_color_completion DCD7BA normal
set --global fish_pager_color_description 727169 brblack
set --global fish_pager_color_prefix 957FB8 magenta
set --global fish_pager_color_progress 727169 brblack
set --global fish_pager_color_secondary_background
set --global fish_pager_color_secondary_completion
set --global fish_pager_color_secondary_description
set --global fish_pager_color_secondary_prefix
set --global fish_pager_color_selected_background -r
set --global fish_pager_color_selected_completion
set --global fish_pager_color_selected_description
set --global fish_pager_color_selected_prefix
end

View file

@ -0,0 +1,20 @@
# ASDF config start
if test -z $ASDF_DATA_DIR
set _asdf_shims "$HOME/.asdf/shims"
else
set _asdf_shims "$ASDF_DATA_DIR/shims"
end
fish_add_path $_asdf_shims
set --erase _asdf_shims
# ASDF config end
test -e /opt/homebrew/bin/brew
and /opt/homebrew/bin/brew shellenv | source -
if status is-interactive
command -q zoxide; and zoxide init fish | source
command -q fzf; and fzf --fish | source
end
command -q pyenv; and pyenv init - | source

View file

@ -0,0 +1,12 @@
if status is-interactive
set --global fish_key_bindings fish_vi_key_bindings
bind --mode insert comma,a 'ssh_add; commandline -f repaint'
bind --mode insert .,comma 'nvim; commandline -f repaint'
bind --mode insert comma,z 'zi; commandline -f repaint'
bind --mode insert comma,f fzf-file-widget
bind --mode insert comma,r fzf-history-widget
bind --mode insert comma,c fzf-cd-widget
bind --mode insert comma,l 'clear; commandline -f repaint'
bind --mode insert comma,o 'opencode; commandline -f repaint'
end