nixos-config/home-manager/zsh.nix

32 lines
775 B
Nix

{ config, lib, pkgs, user, theme, ... }:
let
zsh_autosuggest_highlight_style = if theme == "light" then "fg=180" else "fg=10";
in
{
programs.zsh = {
enable = true;
enableAutosuggestions = true;
enableCompletion = true;
history.size = 10000;
initExtra = ''
function set_win_title(){
local TITLE=$(git config --get remote.origin.url || echo "$PWD")
echo -ne "\033]0; $(basename "$TITLE") \007"
}
precmd_functions+=(set_win_title)
'';
sessionVariables = {
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE = zsh_autosuggest_highlight_style;
};
shellAliases = {
ls = "eza --group-directories-first --git";
neovide = "neovide --multigrid";
xclip = "xclip -selection clipboard";
};
};
}