mirror of
https://github.com/mitchell/dotfiles.git
synced 2025-12-17 12:27:22 +00:00
defiant
This commit is contained in:
parent
44780e9a9e
commit
874bbc3c1d
13 changed files with 728 additions and 125 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue