more zsh fun

This commit is contained in:
2024-04-20 13:43:24 +02:00
parent 3eb9a1f4bf
commit 9a7c681389
3 changed files with 31 additions and 38 deletions

View File

@@ -2,9 +2,6 @@
cli = import ../aliases.nix;
in {
home.packages = with pkgs; [
zsh-autosuggestions
zsh-powerlevel10k
zsh-prezto
];
programs.zsh = {
@@ -14,42 +11,32 @@ in {
history.size = 10000000;
history.path = "${config.xdg.dataHome}/zsh/history";
# shellAliases = cli.myAliases;
#
# syntaxHighlighting = {
# enable = true;
# };
#
# initExtra = ''
# [[ ! -f ${./p10k.zsh} ]] || source ${./p10k.zsh}
# eval "$(zoxide init --cmd cd zsh)"
# '';
# plugins = [
# {
# name = "powerlevel10k";
# src = pkgs.zsh-powerlevel10k;
# file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
# }
# ];
shellAliases = cli.myAliases;
# plug = {
# enable = true;
# plugins = [
# { name = "zsh-users/zsh-autosuggestions"; }
# ];
# };
plugins = [
{
name = "powerlevel10k";
src = pkgs.zsh-powerlevel10k;
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
}
];
# oh-my-zsh = {
# enable = true;
# plugins = [ "git" "vi-mode" ];
# };
#
# prezto = {
# enable = true;
# tmux = {
# autoStartLocal = true;
# autoStartRemote = true;
# };
# };
enableAutosuggestions = true;
syntaxHighlighting = {
enable = true;
};
historySubstringSearch = {
enable = true;
};
initExtra = ''
[[ ! -f ${./p10k.zsh} ]] || source ${./p10k.zsh}
eval "$(zoxide init --cmd cd zsh)"
if [ -x "$(command -v tmux)" ] && [ -n "$DISPLAY" ] && [ -z "$TMUX" ]; then
exec tmux new-session -A -s $USER >/dev/null 2>&1
fi
'';
};
}

View File

@@ -0,0 +1,3 @@
if [ "$(tty)" = "/dev/tty1" ];then
exec startx
fi

View File

@@ -34,5 +34,8 @@
".xinitrc" = {
source = ./.xinitrc;
};
".zprofile" = {
source = ./.zprofile;
};
};
}