From d6124a69ce741c3dedd943eaa5a6ee31fc6beb6f Mon Sep 17 00:00:00 2001 From: Dimitar Nizamov Date: Sat, 20 Jan 2024 17:05:17 +0100 Subject: [PATCH] return alacritty fullscreen with changed delays --- .../osx_alacritty_start_tmux.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/scripts/handle_tmux_automatic_start/osx_alacritty_start_tmux.sh b/scripts/handle_tmux_automatic_start/osx_alacritty_start_tmux.sh index 319e268..b64e27e 100755 --- a/scripts/handle_tmux_automatic_start/osx_alacritty_start_tmux.sh +++ b/scripts/handle_tmux_automatic_start/osx_alacritty_start_tmux.sh @@ -39,16 +39,23 @@ resize_window_to_full_screen() { resize_to_true_full_screen() { osascript <<-EOF - tell application "alacritty" + tell application "Alacritty" # wait for alacritty to start delay 1 activate # short wait for alacritty to gain focus delay 0.1 - tell application "System Events" to tell process "alacritty" - keystroke "f" using {control down, command down} - end tell - end tell + tell application "System Events" to tell process "Alacritty" + if front window exists then + tell front window + if value of attribute "AXFullScreen" then + set value of attribute "AXFullScreen" to false + else + set value of attribute "AXFullScreen" to true + end if + end tell + end if + end tell EOF }