From 731b4c96a66f37bec907b0a9d2900e2332c5fb3c Mon Sep 17 00:00:00 2001 From: Ray Andrew Date: Fri, 12 Dec 2025 20:33:41 -0600 Subject: [PATCH] fix: bug in opening ghostty twice while opening neomutt+spotify --- bin/open-mail | 2 ++ bin/open-music | 2 ++ config/aerospace/aerospace.toml | 37 +++++++++++++++++++++++++-------- 3 files changed, 32 insertions(+), 9 deletions(-) diff --git a/bin/open-mail b/bin/open-mail index 5384d70..339da8a 100755 --- a/bin/open-mail +++ b/bin/open-mail @@ -5,6 +5,8 @@ if [[ "$(uname)" == "Darwin" ]]; then if aerospace list-windows --all | grep -q 'Mail.*Ghostty\|Ghostty.*Mail'; then aerospace workspace 8 else + open -ga Ghostty + sleep 0.2 aerospace workspace 8 open -na Ghostty --args --title="Mail" -e ~/dotfiles/bin/path-shim neomutt fi diff --git a/bin/open-music b/bin/open-music index 0432a7d..1bd2f60 100755 --- a/bin/open-music +++ b/bin/open-music @@ -5,6 +5,8 @@ if [[ "$(uname)" == "Darwin" ]]; then if aerospace list-windows --all | grep -q 'Music.*Ghostty\|Ghostty.*Music'; then aerospace workspace 7 else + open -ga Ghostty + sleep 0.2 aerospace workspace 7 open -na Ghostty --args --title="Music" -e /etc/profiles/per-user/rayandrew/bin/spotify_player fi diff --git a/config/aerospace/aerospace.toml b/config/aerospace/aerospace.toml index b0797a0..f05f6bc 100644 --- a/config/aerospace/aerospace.toml +++ b/config/aerospace/aerospace.toml @@ -83,6 +83,10 @@ on-focus-changed = [ 'mode resize', 'exec-and-forget ~/dotfiles/bin/path-shim sketchybar --trigger send_message MESSAGE=RESIZE_MODE HOLD=true' ] + alt-g = [ + 'mode group', + 'exec-and-forget ~/dotfiles/bin/path-shim sketchybar --trigger send_message MESSAGE=GROUP_MODE HOLD=true' + ] cmd-ctrl-1 = "exec-and-forget ~/dotfiles/bin/path-shim aerospace-scratchpad show Finder" @@ -107,15 +111,8 @@ on-focus-changed = [ 'exec-and-forget ~/dotfiles/bin/path-shim sketchybar --reload', 'mode main', ] - r = ['flatten-workspace-tree', 'mode main'] - f = ['layout floating tiling', 'mode main'] - backspace = ['close-all-windows-but-current', 'mode main'] - - alt-shift-h = ['join-with left', 'mode main'] - alt-shift-j = ['join-with down', 'mode main'] - alt-shift-k = ['join-with up', 'mode main'] - alt-shift-l = ['join-with right', 'mode main'] - + r = ['flatten-workspace-tree'] + backspace = ['close-all-windows-but-current'] p = [ 'exec-and-forget ~/dotfiles/bin/presentation-mode on', @@ -130,6 +127,28 @@ on-focus-changed = [ 'mode main' ] +[mode.group.binding] + # Join with direction + make tabbed (h_accordion for horizontal, v_accordion for vertical) + h = ['join-with left', 'layout h_accordion'] + j = ['join-with down', 'layout v_accordion'] + k = ['join-with up', 'layout v_accordion'] + l = ['join-with right', 'layout h_accordion'] + + # Layout options (apply to current container) + t = 'layout h_accordion' + s = 'layout v_accordion' + e = 'layout tiles horizontal vertical' + + # Exit group mode + esc = [ + 'mode main', + 'exec-and-forget ~/dotfiles/bin/path-shim sketchybar --trigger hide_message' + ] + enter = [ + 'mode main', + 'exec-and-forget ~/dotfiles/bin/path-shim sketchybar --trigger hide_message' + ] + [[on-window-detected]] if.app-id = 'com.apple.finder' run = ['layout floating']