Add zsh, swap alacritty for kitty
Adds zsh with nix-your-shell support switch from alacritty to kitty Add zsh Fix ZSH, and switch to ZSH from alacritty Add zsh prompt Swap any-nix-shell for nix-your-shell
This commit is contained in:
parent
c97d94408e
commit
a07b300be7
4 changed files with 36 additions and 3 deletions
31
programs/zsh/default.nix
Normal file
31
programs/zsh/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
dotDir = ".config/zsh";
|
||||
|
||||
history.save = 10000;
|
||||
history.size = 10000;
|
||||
history.path = "${config.xdg.dataHome}/zsh/history";
|
||||
initExtra = ''
|
||||
# Nix-shell
|
||||
${pkgs.nix-your-shell}/bin/nix-your-shell zsh | source /dev/stdin
|
||||
|
||||
# Prompt
|
||||
autoload -U colors && colors
|
||||
autoload -Uz vcs_info
|
||||
precmd_vcs_info() { vcs_info }
|
||||
precmd_functions+=( precmd_vcs_info )
|
||||
setopt prompt_subst
|
||||
zstyle ':vcs_info:*' check-for-changes true
|
||||
zstyle ':vcs_info:*' unstagedstr '·*'
|
||||
zstyle ':vcs_info:*' stagedstr '·+'
|
||||
zstyle ':vcs_info:git:*' formats '%b%u%c'
|
||||
export PROMPT="%(0?.%F{white}.%? %F{red})τ%f "
|
||||
export RPROMPT="%F{yellow}\$vcs_info_msg_0_%f %F{blue}%~%f"
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue