diff --git a/home-manager/shell.nix b/home-manager/shell.nix index 436ca24..1961914 100644 --- a/home-manager/shell.nix +++ b/home-manager/shell.nix @@ -9,9 +9,16 @@ rm = "rm -i"; cal = "cal -m"; ls = "ls --color"; + cd = "z"; }; envExtra = '' - export PS1=$'%B%n%b@%B%m%b: %~\nλ ' + PROMPT=$'%B%n%b@%B%m%b: %~ %F{red}''${vcs_info_msg_0_}%f\nλ ' + KEYTIMEOUT=1 + MODE_INDICATOR_VICMD='%K{10}%F{8}%B NORMAL %k%f%b' + MODE_INDICATOR_REPLACE='%K{9}%F{8}%B REPLACE %k%f%b' + MODE_INDICATOR_SEARCH='%K{13}%F{8}%B SEARCH %k%f%b' + MODE_INDICATOR_VISUAL='%K{12}%F{8}%B VISUAL %k%f%b' + MODE_INDICATOR_VLINE='%K{12}%F{8}%B V-LINE %k%f%b' export BROWSER=firefox export XINITRC="${common.homeDir}/bin/xinitrc" export XAUTHORITY="${common.homeDir}/.local/share/Xauthority" @@ -53,13 +60,15 @@ nix shell --impure "$@" } - # vi mode options - KEYTIMEOUT=1 - MODE_INDICATOR_VICMD='%K{10}%F{8}%B NORMAL %k%f%b' - MODE_INDICATOR_REPLACE='%K{9}%F{8}%B REPLACE %k%f%b' - MODE_INDICATOR_SEARCH='%K{13}%F{8}%B SEARCH %k%f%b' - MODE_INDICATOR_VISUAL='%K{12}%F{8}%B VISUAL %k%f%b' - MODE_INDICATOR_VLINE='%K{12}%F{8}%B V-LINE %k%f%b' + autoload -Uz add-zsh-hook vcs_info + setopt prompt_subst + add-zsh-hook precmd vcs_info + + zstyle ':vcs_info:*' check-for-changes true + zstyle ':vcs_info:*' unstagedstr '*' + zstyle ':vcs_info:*' stagedstr '+' + zstyle ':vcs_info:git:*' formats '(%b%u%c)' + zstyle ':vcs_info:git:*' actionformats '(%b|%a%u%c)' ''; plugins = [ { @@ -78,4 +87,7 @@ enable = true; nix-direnv.enable = true; }; + programs.zoxide = { + enable = true; + }; }