use powerlevel10k
This commit is contained in:
parent
d57cfa8e71
commit
d45c91f6af
3 changed files with 1733 additions and 29 deletions
|
@ -516,6 +516,19 @@ in
|
|||
programs.zsh.enable = true;
|
||||
environment.shells = with pkgs; [ zsh ];
|
||||
|
||||
# use powerlevel10k
|
||||
environment.etc."powerlevel10k/p10k.zsh".source = ./p10k.zsh;
|
||||
programs.zsh.promptInit = ''
|
||||
# use powerlevel10k
|
||||
source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme
|
||||
source /etc/powerlevel10k/p10k.zsh
|
||||
|
||||
# use powerlevel10k instant prompt
|
||||
if [[ -r "''${XDG_CACHE_HOME:-''$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then
|
||||
source "''${XDG_CACHE_HOME:-''$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh"
|
||||
fi
|
||||
'';
|
||||
|
||||
# needed for the ZSH completion
|
||||
environment.pathsToLink = [ "/share/zsh" ];
|
||||
|
||||
|
|
|
@ -60,35 +60,6 @@
|
|||
};
|
||||
};
|
||||
|
||||
# nice prompt
|
||||
# https://starship.rs/config/
|
||||
# https://draculatheme.com/starship
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
settings = {
|
||||
command_timeout = 10000;
|
||||
aws.style = "bold #ffb86c";
|
||||
cmd_duration.style = "bold #f1fa8c";
|
||||
directory.style = "bold #50fa7b";
|
||||
hostname.style = "bold #ff5555";
|
||||
git_branch.style = "bold #ff79c6";
|
||||
git_status.style = "bold #ff5555";
|
||||
username = {
|
||||
format = "[$user]($style) on ";
|
||||
style_user = "bold #bd93f9";
|
||||
};
|
||||
character = {
|
||||
success_symbol = "[❯](bold #f8f8f2)";
|
||||
error_symbol = "[❯](bold #ff5555)";
|
||||
};
|
||||
directory = {
|
||||
truncation_length = 8;
|
||||
truncate_to_repo = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# nice cd
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
|
|
1720
share/p10k.zsh
Normal file
1720
share/p10k.zsh
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue