From 619844e03dbeca4eadbbce073a59b887a644492d Mon Sep 17 00:00:00 2001 From: Aria Nolan Date: Tue, 10 Oct 2023 23:50:03 -0400 Subject: [PATCH] add zsh plugins --- home.nix | 2 ++ shell/.p10k.zsh | 3 +++ shell/zsh.nix | 49 +++++++++++++++++++++++++++++++++---------------- 3 files changed, 38 insertions(+), 16 deletions(-) diff --git a/home.nix b/home.nix index 8c9ca45..1a73c5a 100644 --- a/home.nix +++ b/home.nix @@ -10,6 +10,8 @@ }; packages = with pkgs; [ wineWowPackages.unstable + eza + bat ]; }; diff --git a/shell/.p10k.zsh b/shell/.p10k.zsh index 83474ed..2acfab7 100644 --- a/shell/.p10k.zsh +++ b/shell/.p10k.zsh @@ -116,6 +116,9 @@ # example # example user-defined segment (see prompt_example function below) ) + typeset -g POWERLEVEL9K_TERM_SHELL_INTEGRATION=true + # makes the terminal not look like shit when shrinking it, only works with kitty + # Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you. typeset -g POWERLEVEL9K_MODE=nerdfont-v3 # When set to `moderate`, some icons will have an extra space after them. This is meant to avoid diff --git a/shell/zsh.nix b/shell/zsh.nix index f390d52..96423f7 100644 --- a/shell/zsh.nix +++ b/shell/zsh.nix @@ -1,4 +1,4 @@ -{ config, pkgs, inputs, ... }: +{ config, pkgs, ... }: { programs.zsh = { @@ -16,6 +16,7 @@ }; historySubstringSearch.enable = true; plugins = [ + { name = "powerlevel10k"; file = "powerlevel10k.zsh-theme"; @@ -25,7 +26,38 @@ rev = "v1.19.0"; sha256 = "+hzjSbbrXr0w1rGHm6m2oZ6pfmD6UUDBfPd7uMg5l5c="; }; + } + + { + name = "zsh-bat"; + src = pkgs.fetchFromGitHub { + owner = "fdellwing"; + repo = "zsh-bat"; + rev = "d7d5df4f6c7dd380e49b47e4da840226a828968a"; + sha256 = "4DQ/qSznM4A9IyM6W0bncHUa4jTIAdBxL16YJgMccHE="; + }; } + + { + name = "z.lua"; + src = pkgs.fetchFromGitHub { + owner = "skywind3000"; + repo = "z.lua"; + rev = "1.8.16"; + sha256 = "VVJXBVENXlJXVj831Hx4sa7AzGHXpsui6tga9uA6ZnE="; + }; + } + + { + name = "zsh-vi-mode"; + src = pkgs.fetchFromGitHub { + owner = "jeffreytse"; + repo = "zsh-vi-mode"; + rev = "v0.10.0"; + sha256 = "QE6ZwwM2X0aPqNnbVrj0y7w9hmuRf0H1j8nXYwyoLo4="; + }; + } + ]; shellAliases = { ls = "eza"; @@ -39,20 +71,5 @@ POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD = true; }; }; - # oh-my-zsh = { - # enable = true; - # plugins = [ - # "z" - # "git" - # "vi-mode" - # "thefuck" - # ]; - # theme = "bira"; # TODO: figure out how to source custom theme - # # other cool themes: - # # duellj - # # simonoff - # # strug - # # bira - # }; home.file.".config/zsh/.p10k.zsh".source = ./.p10k.zsh; }