From 175066ecba7e404f02f03e795b2b5e166ca1cf61 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 27 Aug 2025 14:38:00 +0200 Subject: [PATCH] Fix migration not to add working-directory if already there And make command line compatible with Ghostty too --- migrations/1755870033.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/migrations/1755870033.sh b/migrations/1755870033.sh index e1a0be0d..fde865be 100644 --- a/migrations/1755870033.sh +++ b/migrations/1755870033.sh @@ -1,3 +1,5 @@ echo "Use current terminal shell cwd for new terminal working directories" -sed -i 's|bindd = SUPER, return, Terminal, exec, \$terminal|bindd = SUPER, return, Terminal, exec, $terminal --working-directory $(omarchy-cmd-terminal-cwd)|' ~/.config/hypr/bindings.conf +if ! grep -q "working-directory" ~/.config/hypr/bindings.conf; then + sed -i '/bindd = SUPER, return, Terminal, exec, \$terminal/ s|$| --working-directory=$(omarchy-cmd-terminal-cwd)|' ~/.config/hypr/bindings.conf +fi