4 changed files with 21 additions and 58 deletions
-
37.config/fish/config.fish
-
14.config/zsh/functions
-
1.config/zsh/plugins/zsh-syntax-highlighting
-
27.zshrc
@ -1,37 +0,0 @@ |
|||
if command -vq flatpak |
|||
set -ga fish_user_paths ~/.local/share/flatpak/exports/bin /var/lib/flatpak/exports/bin |
|||
set -gx --path XDG_DATA_DIRS /usr/local/share/ /usr/share/ ~/.local/share/flatpak/exports/share |
|||
for install_dir in (flatpak --installations) |
|||
set -gxa XDG_DATA_DIRS $install_dir/exports/share |
|||
end |
|||
end |
|||
|
|||
egrep "^export " ~/.bash_profile | while read e |
|||
set var (echo $e | sed -E "s/^export ([A-Za-z_]+)=(.*)\$/\1/") |
|||
set value (echo $e | sed -E "s/^export ([A-Za-z_]+)=(.*)\$/\2/") |
|||
|
|||
# remove surrounding quotes if existing |
|||
set value (echo $value | sed -E "s/^\"(.*)\"\$/\1/") |
|||
|
|||
if test $var = "PATH" |
|||
# replace ":" by spaces. this is how PATH looks for Fish |
|||
set value (echo $value | sed -E "s/:/ /g") |
|||
|
|||
# use eval because we need to expand the value |
|||
eval set -xg $var $value |
|||
|
|||
continue |
|||
end |
|||
|
|||
# evaluate variables. we can use eval because we most likely just used "$var" |
|||
set value (eval echo $value) |
|||
|
|||
#echo "set -xg '$var' '$value' (via '$e')" |
|||
set -xg $var $value |
|||
end |
|||
|
|||
if status --is-interactive |
|||
fastfetch |
|||
end |
|||
|
|||
set -U fish_user_paths /usr/local/ubin ~/bin ~/go/bin ~/anaconda3/bin $fish_user_paths |
@ -1,21 +1,23 @@ |
|||
#!/bin/zsh |
|||
function zsh_add_config() { |
|||
[ -f "$ZSH_CONFIG/$1" ] && ! [ -L "$ZSH_CONFIG/$1" ] && source "$ZSH_CONFIG/$1" |
|||
[ -f "$ZDOTDIR/$1" ] && ! [ -L "$ZDOTDIR/$1" ] && source "$ZDOTDIR/$1" |
|||
} |
|||
|
|||
function zsh_add_plugin() { |
|||
PLUGIN_NAME=$(echo $1 | cut -d"/" -f2) |
|||
if ! [ -d "$ZSH_CONFIG/plugins/$PLUGIN_NAME" ]; then |
|||
git clone "https://github.com/$1.git" "$ZSH_CONFIG/plugins/$PLUGIN_NAME" |
|||
if ! [ -d "$ZDOTDIR/plugins/$PLUGIN_NAME" ]; then |
|||
git clone "https://github.com/$1.git" "$ZDOTDIR/plugins/$PLUGIN_NAME" |
|||
fi |
|||
zsh_add_config "plugins/$PLUGIN_NAME/$PLUGIN_NAME.plugin.zsh" |
|||
zsh_add_config "plugins/$PLUGIN_NAME/$PLUGIN_NAME.zsh" |
|||
zsh_add_config "plugins/$PLUGIN_NAME/async" |
|||
zsh_add_config "plugins/$PLUGIN_NAME/nix.plugin.zsh" |
|||
} |
|||
|
|||
function zsh_fpath_plugin() { |
|||
PLUGIN_NAME=$(echo $1 | cut -d"/" -f2) |
|||
if ! [ -d "$ZSH_CONFIG/plugins/$PLUGIN_NAME" ]; then |
|||
git clone "https://github.com/$1.git" "$ZSH_CONFIG/plugins/$PLUGIN_NAME" |
|||
if ! [ -d "$ZDOTDIR/plugins/$PLUGIN_NAME" ]; then |
|||
git clone "https://github.com/$1.git" "$ZDOTDIR/plugins/$PLUGIN_NAME" |
|||
fi |
|||
fpath+=($ZSH_CONFIG/plugins/$PLUGIN_NAME) |
|||
fpath+=($ZDOTDIR/plugins/$PLUGIN_NAME) |
|||
} |
@ -1 +0,0 @@ |
|||
Subproject commit caa749d030d22168445c4cb97befd406d2828db0 |
Write
Preview
Loading…
Cancel
Save
Reference in new issue