This commit is contained in:
mitchell 2025-10-19 02:42:39 -04:00
parent 44780e9a9e
commit 846fc109ca
32 changed files with 719 additions and 1117 deletions

View file

@ -0,0 +1,14 @@
# 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

@ -0,0 +1,46 @@
# 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

View file

@ -2,9 +2,6 @@ function configure_fish
# Determine OS
set uname (uname)
# Set umask
umask 077
# Begin profile init
# (These functions are defined in the functions/ directory.)
define_global_variables

View file

@ -21,6 +21,7 @@ function define_aliases -a uname -d 'Defines aliases for commonly used commands'
alias ai aichat
alias ais aisearch
alias adr aider
alias fwl 'sudo firewall-cmd'
switch "$uname"
case Linux

View file

@ -6,7 +6,7 @@ function define_global_variables -d 'Defines all and exclusively globally export
set -gx EDITOR nvim
set -gx BROWSER firefox
set -gx DIFFPROG nvim -d
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/"'
@ -15,8 +15,6 @@ function define_global_variables -d 'Defines all and exclusively globally export
set -gx GOPATH $HOME/code/go
set -gx GOBIN $GOPATH/bin
set -gx GTK_THEME Kanagawa-BL
set -gx BUN_INSTALL $HOME/.bun
set -gx LIBVIRT_DEFAULT_URI 'qemu:///system'

View file

@ -1,54 +0,0 @@
function fwl -d 'Function to simplify interacting with firewalld'
argparse --ignore-unknown \
p/permanent \
r/reset \
'z/zone=' \
'o/policy=' \
's/service=' \
-- $argv
if set -q _flag_reset
echo 'Resetting fwl ...'
_fwl_reset
return
end
if set -q _flag_permanent
if set -q _fwl_perm
set -ge _fwl_perm
else
set -g _fwl_perm --permanent
end
end
if set -q _flag_zone
set -g _fwl_mode "--zone=$_flag_z"
else if set -q _flag_policy
set -g _fwl_mode "--policy=$_flag_o"
else if set -q _flag_service
set -g _fwl_mode "--service=$_flag_s"
end
echo fwl_mode={$_fwl_perm} $_fwl_mode
test -z "$argv"; and return
switch $argv
case i info
set argv --list-all
case a all
set argv --list-all-zones
case on all-on
set argv --get-active-zones
case s services
set argv --get-services
end
sudo firewall-cmd {$_fwl_perm} {$_fwl_mode} $argv
end
function _fwl_reset -d 'Reset fwl global variables'
set -ge _fwl_mode
set -ge _fwl_perm
return 0
end

View file

@ -8,11 +8,7 @@ function import_sources -a uname -d 'Loads any additional fish files needed at i
set _asdf_shims "$ASDF_DATA_DIR/shims"
end
# Do not use fish_add_path (added in Fish 3.2) because it
# potentially changes the order of items in PATH
if not contains $_asdf_shims $PATH
set -gx --prepend PATH $_asdf_shims
end
fish_add_path $_asdf_shims
set --erase _asdf_shims
test -e /opt/homebrew/bin/brew