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; cli = import ../aliases.nix;
in { in {
home.packages = with pkgs; [ home.packages = with pkgs; [
zsh-autosuggestions
zsh-powerlevel10k
zsh-prezto
]; ];
programs.zsh = { programs.zsh = {
@@ -14,42 +11,32 @@ in {
history.size = 10000000; history.size = 10000000;
history.path = "${config.xdg.dataHome}/zsh/history"; history.path = "${config.xdg.dataHome}/zsh/history";
# shellAliases = cli.myAliases; 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";
# }
# ];
# plug = { plugins = [
# enable = true; {
# plugins = [ name = "powerlevel10k";
# { name = "zsh-users/zsh-autosuggestions"; } src = pkgs.zsh-powerlevel10k;
# ]; file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
# }; }
];
# oh-my-zsh = { enableAutosuggestions = true;
# enable = true;
# plugins = [ "git" "vi-mode" ]; syntaxHighlighting = {
# }; enable = true;
# };
# prezto = {
# enable = true; historySubstringSearch = {
# tmux = { enable = true;
# autoStartLocal = true; };
# autoStartRemote = 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" = { ".xinitrc" = {
source = ./.xinitrc; source = ./.xinitrc;
}; };
".zprofile" = {
source = ./.zprofile;
};
}; };
} }