refactor: extract zsh config

main
mandlm 2024-07-10 13:06:26 +02:00
parent 8f1ca25dba
commit 55af25ccb3
Signed by: mandlm
GPG Key ID: 088ED38F036C7AF2
4 changed files with 47 additions and 63 deletions

View File

@ -34,6 +34,7 @@
../starship.nix ../starship.nix
../tree.nix ../tree.nix
../zoxide.nix ../zoxide.nix
../zsh.nix
./ssh.nix ./ssh.nix
./zsh.nix ./zsh.nix
]; ];

View File

@ -1,20 +1,6 @@
{ ... }: { ... }:
{ {
programs.zsh = { programs.zsh.initExtra = ''
enable = true;
enableCompletion = true;
history.size = 10000;
autosuggestion = {
enable = true;
highlight = "fg=10";
};
syntaxHighlighting = {
enable = true;
};
initExtra = ''
if [ -f $HOME/.nix-profile/etc/profile.d/nix.sh ]; if [ -f $HOME/.nix-profile/etc/profile.d/nix.sh ];
then then
source $HOME/.nix-profile/etc/profile.d/nix.sh source $HOME/.nix-profile/etc/profile.d/nix.sh
@ -64,5 +50,4 @@
echo "done." echo "done."
} }
''; '';
};
} }

View File

@ -71,6 +71,6 @@
../sway ../sway
../tree.nix ../tree.nix
../zoxide.nix ../zoxide.nix
./zsh.nix ../zsh.nix
]; ];
} }

View File

@ -13,6 +13,10 @@ in
highlight = zsh_autosuggest_highlight_style; highlight = zsh_autosuggest_highlight_style;
}; };
syntaxHighlighting = {
enable = true;
};
initExtra = '' initExtra = ''
function set_win_title(){ function set_win_title(){
local TITLE=$(git config --get remote.origin.url || echo "$PWD") local TITLE=$(git config --get remote.origin.url || echo "$PWD")
@ -21,11 +25,5 @@ in
precmd_functions+=(set_win_title) precmd_functions+=(set_win_title)
''; '';
shellAliases = {
ls = "eza --group-directories-first --git";
neovide = "neovide --multigrid";
xclip = "xclip -selection clipboard";
};
}; };
} }