diff --git a/homes/x86_64-linux/rafiq/default.nix b/homes/x86_64-linux/rafiq/default.nix index 9d5a060..9a5f5e6 100644 --- a/homes/x86_64-linux/rafiq/default.nix +++ b/homes/x86_64-linux/rafiq/default.nix @@ -5,6 +5,7 @@ }: { cli.shell = "zsh"; + cli.enableScreensaver = true; cli.editor = "nvf"; cli.file-browser = "yazi"; cli.multiplexer = "zellij"; diff --git a/modules/home/cli/default.nix b/modules/home/cli/default.nix index 6381ac9..86b9538 100644 --- a/modules/home/cli/default.nix +++ b/modules/home/cli/default.nix @@ -7,6 +7,7 @@ { options.cli = { shell = lib.pantheon.mkStrOption; + enableScreensaver = lib.mkEnableOption ""; editor = lib.pantheon.mkStrOption; file-browser = lib.pantheon.mkStrOption; multiplexer = lib.pantheon.mkStrOption; diff --git a/modules/home/cli/shell/default.nix b/modules/home/cli/shell/default.nix index bed3255..7fc8898 100644 --- a/modules/home/cli/shell/default.nix +++ b/modules/home/cli/shell/default.nix @@ -2,26 +2,36 @@ { config = lib.mkIf (config.cli.shell == "zsh") { home.sessionVariables.SHELL = "zsh"; + home.persistence."/persist/home/${config.snowfallorg.user.name}".files = [ ".zsh_history" ]; programs.zsh = { enable = true; enableVteIntegration = true; syntaxHighlighting.enable = true; - history.share = true; - history.size = 10000; - history.ignoreDups = true; - history.ignoreSpace = true; - initContent = - lib.mkOrder 1200 - # zsh - '' - RPROMPT='[%D{%L:%M:%S %p}]' - - TMOUT=1 - - TRAPALRM() { - zle reset-prompt - } - ''; + historySubstringSearch.enable = true; + history = { + append = true; + extended = true; + ignoreDups = true; + ignoreSpace = true; + save = 10000; + share = true; + size = 10000; + }; }; + programs.zsh.initContent = lib.mkIf config.cli.enableScreensaver ( + lib.mkOrder 1200 + # zsh + '' + setopt PROMPT_SUBST + PROMPT='> ' + RPROMPT='[%D{%L:%M:%S %p}]' + + TMOUT=1 + + TRAPALRM() { + zle reset-prompt + } + '' + ); }; }