much nicer shell without powerlevel fuckup

This commit is contained in:
2026-09-10 16:22:12 +02:00
parent 66b35566e5
commit 0b53e2759d
4 changed files with 127 additions and 1769 deletions
+1 -1
View File
@@ -4,6 +4,7 @@
programs.alacritty = {
enable = true;
settings = {
font.normal.family = "FiraCode Nerd Font";
terminal.shell = {
program = "${pkgs.tmux}/bin/tmux";
@@ -16,4 +17,3 @@
};
};
}
File diff suppressed because it is too large Load Diff
+114 -17
View File
@@ -1,10 +1,93 @@
{ config, pkgs, ... }:
{ config, ... }:
{
programs.fzf = {
enable = true;
enableZshIntegration = true;
};
programs.starship = {
enable = true;
enableZshIntegration = true;
settings = {
add_newline = true;
format = "$directory$git_branch$git_status$line_break$character";
right_format = "$status$cmd_duration$jobs$direnv$python$nix_shell";
character = {
success_symbol = "[](bold fg:#a6e3a1)";
error_symbol = "[](bold fg:#f38ba8)";
vimcmd_symbol = "[](bold fg:#cba6f7)";
};
directory = {
style = "bold fg:#1e1e2e bg:#89b4fa";
format = "[](fg:#89b4fa)[ $path$read_only ]($style)[](fg:#89b4fa) ";
truncation_length = 3;
truncation_symbol = "/";
truncate_to_repo = false;
read_only = " ";
};
git_branch = {
symbol = " ";
style = "fg:#1e1e2e bg:#cba6f7";
format = "[](fg:#cba6f7)[ $symbol$branch ]($style)[](fg:#cba6f7) ";
};
git_status = {
style = "fg:#f9e2af";
format = "[($all_status$ahead_behind )]($style)";
conflicted = "~$count ";
stashed = "*$count ";
staged = "+$count ";
modified = "!$count ";
renamed = "»$count ";
deleted = "$count ";
untracked = "?$count ";
ahead = "$count ";
behind = "$count ";
};
status = {
disabled = false;
style = "bold fg:#f38ba8";
symbol = " ";
format = "[ $symbol$status ]($style)";
};
cmd_duration = {
min_time = 3000;
style = "fg:#f9e2af";
format = "[ $duration ]($style)";
};
jobs = {
style = "fg:#f9e2af";
symbol = " ";
format = "[ $symbol$number ]($style)";
number_threshold = 1;
};
direnv = {
disabled = false;
style = "fg:#f9e2af";
format = "[ $symbol$allowed ]($style)";
};
python = {
style = "fg:#a6e3a1";
format = "[ $symbol$virtualenv ]($style)";
detect_extensions = [ ];
detect_files = [ ];
detect_folders = [ ];
};
nix_shell = {
style = "fg:#89b4fa";
symbol = "";
format = "[ $state $symbol ]($style)";
};
};
};
programs.zsh = {
enable = true;
dotDir = config.home.homeDirectory;
enableCompletion = true;
defaultKeymap = "emacs";
syntaxHighlighting.enable = true;
autosuggestion = {
@@ -18,6 +101,35 @@
historySubstringSearch.enable = true;
initContent = ''
# Tab opens a menu; arrows navigate it and matching ignores case.
zmodload zsh/complist
zstyle ':completion:*' menu select
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
zstyle ':completion:*' group-name '''
zstyle ':completion:*:descriptions' format '%F{yellow}%d%f'
# Accept ghost text at the end of the line, or one word with Alt+Right.
bindkey '^[[C' forward-char
bindkey '^[OC' forward-char
bindkey '^[[1;3C' forward-word
bindkey '^F' autosuggest-accept
# Pos1/Home and Ende/End in Alacritty and tmux terminal modes.
bindkey '^[[H' beginning-of-line
bindkey '^[OH' beginning-of-line
bindkey '^[[1~' beginning-of-line
bindkey '^[[F' end-of-line
bindkey '^[OF' end-of-line
bindkey '^[[4~' end-of-line
# Search history for the text already typed (both terminal arrow modes).
bindkey '^[[A' history-substring-search-up
bindkey '^[OA' history-substring-search-up
bindkey '^[[B' history-substring-search-down
bindkey '^[OB' history-substring-search-down
'';
history = {
size = 100000;
save = 100000;
@@ -34,24 +146,9 @@
extended = true;
};
initContent = "source /etc/nixos/home/lukas/common/p10k.zsh";
sessionVariables = {
POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD = "true";
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE = "fg=8";
ZSH_AUTOSUGGEST_STRATEGY = "history completion";
};
zplug = {
enable = true;
plugins = [
{
name = "romkatv/powerlevel10k";
tags = [
"as:theme"
"depth:1"
];
}
];
VIRTUAL_ENV_DISABLE_PROMPT = "1";
};
shellAliases = {