aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2025-02-03 22:57:50 -0800
committerGravatar Tom Willemse2025-02-03 22:57:50 -0800
commitde4407a85cf607bee73ac5798b6050a4e15a16e3 (patch)
tree010728565df361a5e7a75188f9c5f5127f7712b5
parentf1854bb4f66f1130ad4b7965c5f306d69a725929 (diff)
downloadnew-dotfiles-de4407a85cf607bee73ac5798b6050a4e15a16e3.tar.gz
new-dotfiles-de4407a85cf607bee73ac5798b6050a4e15a16e3.zip
pop-os: Set Atuin to accept a command on RET
-rw-r--r--oni/home/config/pop-os.scm3
-rw-r--r--oni/home/services/zsh.scm10
2 files changed, 11 insertions, 2 deletions
diff --git a/oni/home/config/pop-os.scm b/oni/home/config/pop-os.scm
index 7d9f7be..9d27802 100644
--- a/oni/home/config/pop-os.scm
+++ b/oni/home/config/pop-os.scm
@@ -137,7 +137,8 @@
(inline-height 20)
(filter-mode 'directory)
(history-filter
- '("^ +"))))
+ '("^ +"))
+ (enter-accept #t)))
(service home-stumpwm-service-type
(home-stumpwm-configuration
diff --git a/oni/home/services/zsh.scm b/oni/home/services/zsh.scm
index 373ea6e..9138214 100644
--- a/oni/home/services/zsh.scm
+++ b/oni/home/services/zsh.scm
@@ -156,6 +156,9 @@
(format #f "~a = ~a~%" (serialize-field-name field)
(string-append "[" (string-join (map (λ (v) (format #f "~s" v)) value) ",") "]")))
+(define (serialize-boolean field value)
+ (format #f "~a = ~a~%" (serialize-field-name field) (if value "true" "false")))
+
(define (filter-mode? value)
(memq value '(global host session directory workspace)))
@@ -173,7 +176,12 @@
(list-of-strings '())
"The history filter allows you to exclude commands from history tracking - maybe
you want to keep ALL of your curl commands totally out of your shell history, or
-maybe just some matching a pattern."))
+maybe just some matching a pattern.")
+ (enter-accept
+ (boolean #f)
+ "When set to true, Atuin will default to immediately executing a command rather
+than the user having to press enter twice. Pressing tab will return to the shell
+and give the user a chance to edit."))
(define (add-zsh-atuin config)
(home-zsh-extension