home-manager/shell/zsh.nix

32 lines
702 B
Nix
Raw Normal View History

2024-10-17 06:47:12 +00:00
{ pkgs, theme, ... }:
2024-07-09 19:58:33 +00:00
let
zsh_autosuggest_highlight_style = if theme == "light" then "fg=180" else "fg=10";
in
{
programs.zsh = {
enable = true;
enableCompletion = true;
history.size = 10000;
autosuggestion = {
enable = true;
highlight = zsh_autosuggest_highlight_style;
};
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)
2024-10-17 06:47:12 +00:00
function zvm_config() {
ZVM_INIT_MODE=sourcing
}
source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh
2024-07-09 19:58:33 +00:00
'';
};
}