update shell config
This commit is contained in:
@@ -1,9 +1,4 @@
|
||||
# PATH
|
||||
fish_add_path $HOME/go/bin
|
||||
fish_add_path $HOME/.cargo/bin
|
||||
fish_add_path $HOME/.local/scripts
|
||||
fish_add_path $HOME/.local/bin
|
||||
fish_add_path $HOME/.local/share/fnm
|
||||
# PATH is managed by .bash_profile
|
||||
|
||||
# man
|
||||
if type -q bat
|
||||
@@ -28,11 +23,6 @@ end
|
||||
# gpg
|
||||
set -x -g GPG_TTY (tty)
|
||||
|
||||
# fnm
|
||||
if type -q fnm
|
||||
eval (fnm env --shell fish)
|
||||
end
|
||||
|
||||
# done
|
||||
set -U __done_min_cmd_duration 10000
|
||||
set -U __done_notification_urgency_level low
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
if test -n "$XDG_CURRENT_DESKTOP"; and test "$XDG_CURRENT_DESKTOP" = "niri"
|
||||
set -l env_config "$HOME/.config/niri/config/envs.kdl"
|
||||
|
||||
if test -f "$env_config"
|
||||
while read -la line
|
||||
# Remove comments
|
||||
set line (string replace -r '//.*' '' -- "$line")
|
||||
# Trim whitespace
|
||||
set line (string trim -- "$line")
|
||||
# Skip "environment" block lines
|
||||
if test -z "$line"; or string match -q "environment*" -- "$line"; or test "$line" = "}"
|
||||
continue
|
||||
end
|
||||
# Match lines like: VARIABLE "value" where VARIABLE is alphanumeric/underscore
|
||||
set -l matches (string match -r '^([0-9A-Za-z_]+)\s+"(.*)"$' -- "$line")
|
||||
# If have a matches, set the environment variable
|
||||
if test (count $matches) -eq 3
|
||||
set -xg $matches[2] $matches[3]
|
||||
end
|
||||
end < "$env_config"
|
||||
end
|
||||
end
|
||||
@@ -1,21 +0,0 @@
|
||||
# ssh with encrypted private keys
|
||||
# $ssh_keys should be set in advance or left empty to use the default keys
|
||||
|
||||
if set -q ENABLE_GPG_AGENT_SSH; and test $ENABLE_GPG_AGENT_SSH != "0";\
|
||||
and type -q gpg-init; and type -q gpgconf
|
||||
# GPG agent for SSH
|
||||
bass $(gpg-init) > /dev/null 2>&1
|
||||
|
||||
else if type -q ssh-init; and type -q ssh-add
|
||||
# SSH with cross-session ssh-agent
|
||||
bass $(ssh-init) > /dev/null 2>&1
|
||||
|
||||
# avoid entering passphrase every time
|
||||
function sshs
|
||||
# test if keys are added to ssh-agent
|
||||
if not ssh-add -l > /dev/null 2>&1
|
||||
ssh-add $ssh_keys
|
||||
end
|
||||
ssh $argv
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user