From 3d260419ee598dfac48e75cf72cb4b0fb545148d Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Mon, 3 Feb 2025 22:33:13 -0800 Subject: [PATCH] =?UTF-8?q?pop-os:=20Set=20filter=20mode=20to=20=E2=80=9Cd?= =?UTF-8?q?irectory=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- oni/home/config/pop-os.scm | 3 ++- oni/home/services/zsh.scm | 12 +++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/oni/home/config/pop-os.scm b/oni/home/config/pop-os.scm index 0637dce..853bb5b 100644 --- a/oni/home/config/pop-os.scm +++ b/oni/home/config/pop-os.scm @@ -134,7 +134,8 @@ (service home-zsh-contextual-abbrevs-service-type) (service home-zsh-atuin-service-type (home-zsh-atuin-configuration - (inline-height 20))) + (inline-height 20) + (filter-mode 'directory))) (service home-stumpwm-service-type (home-stumpwm-configuration diff --git a/oni/home/services/zsh.scm b/oni/home/services/zsh.scm index 773d2ad..07e7697 100644 --- a/oni/home/services/zsh.scm +++ b/oni/home/services/zsh.scm @@ -146,13 +146,23 @@ (define (serialize-integer field value) (format #f "~a = ~a" (string-replace-substring (symbol->string field) "-" "_") value)) +(define (serialize-filter-mode field value) + (format #f "~a = ~s~%" (string-replace-substring (symbol->string field) "-" "_") + (symbol->string value))) + +(define (filter-mode? value) + (memq value '(global host session directory workspace))) + (define-configuration home-zsh-atuin-configuration (package (package rust-atuin-18) "Package to use for setting atuin.") (inline-height (integer 40) - "Set the maximum number of lines Atuin’s interface should take up.")) + "Set the maximum number of lines Atuin’s interface should take up.") + (filter-mode + (filter-mode 'global) + "The default filter to use when searching")) (define (add-zsh-atuin config) (home-zsh-extension