Fri Jun 14 06:54:59 PM UTC 2024
This commit is contained in:
parent
992da67998
commit
e7ab2e1c77
|
@ -72,4 +72,9 @@ in
|
|||
LANG = "en_US.UTF-8";
|
||||
XDG_RUNTIME_DIR = "/run/user/$(id -u)";
|
||||
};
|
||||
|
||||
programs.zsh.initExtra = ''
|
||||
LOCAL_SEARCH_DIRS=(~/.dotfiles/ ~/Containers ~/Workspace ~/Storage/Thomas ~/Storage/Shared)
|
||||
REMOTE_SEARCH_DIRS=()
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -71,4 +71,8 @@ in
|
|||
XDG_RUNTIME_DIR = "/run/user/$(id -u)";
|
||||
};
|
||||
|
||||
programs.zsh.initExtra = ''
|
||||
LOCAL_SEARCH_DIRS=(~/.dotfiles/ ~/Storage/Thomas/ ~/Storage/Etienne/ ~/Storage/Magda\ and\ Etienne/ ~/Containers/)
|
||||
REMOTE_SEARCH_DIRS=()
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -44,6 +44,11 @@
|
|||
syntaxHighlighting.enable = false;
|
||||
autosuggestion.enable = true;
|
||||
|
||||
initExtra = pkgs.lib.mkDefault ''
|
||||
LOCAL_SEARCH_DIRS=(~/.dotfiles/)
|
||||
REMOTE_SEARCH_DIRS=(~/Workspace/ /home/server/Storage/Shared/ /home/server/Storage/Thomas/)
|
||||
'';
|
||||
|
||||
initExtraFirst = ''
|
||||
ZVM_VI_INSERT_ESCAPE_BINDKEY=jj
|
||||
source ${./files/waypipe.zsh}
|
||||
|
|
|
@ -27,15 +27,14 @@ function find_global() {
|
|||
fi
|
||||
if [ ! -f $FZY_CACHE ]; then
|
||||
PATHS=""
|
||||
search_dirs=(~/.dotfiles/ ~/Workspace/ ~/Containers/ /home/server/Storage/Thomas/)
|
||||
for i in "$search_dirs[@]"; do
|
||||
for i in "$LOCAL_SEARCH_DIRS[@]"; do
|
||||
if [ -d $i ]; then
|
||||
PATHS="$PATHS\n$i"
|
||||
if [ "$(hostname)" = "mallorea" ]; then
|
||||
PATHS+="\n$(fd . $i -t $file_type -d 8)"
|
||||
else
|
||||
PATHS+="\n$(ssh mallorea fd . $i -t $file_type -d 8)"
|
||||
fi
|
||||
PATHS="$PATHS\n$i\n$(fd . $i -t $file_type -d 8)"
|
||||
fi
|
||||
done
|
||||
for i in "$REMOTE_SEARCH_DIRS[@]"; do
|
||||
if [ -d $i ]; then
|
||||
PATHS="$PATHS\n$i\n$(ssh mallorea fd . $i -t $file_type -d 8)"
|
||||
fi
|
||||
done
|
||||
echo -e "$PATHS" > $FZY_CACHE
|
||||
|
|
Loading…
Reference in New Issue