refactor kitty,alacritty,warp startup scripts to same implementation

pull/134/head
Dimitar Nizamov 2024-01-20 16:57:15 +01:00
parent d22f69429d
commit cf8baeade0
3 changed files with 7 additions and 15 deletions

View File

@ -7,7 +7,7 @@ start_terminal_and_run_tmux() {
osascript <<-EOF
tell application "alacritty"
activate
delay 0.5
delay 1
tell application "System Events" to tell process "alacritty"
set frontmost to true
keystroke "tmux"
@ -39,19 +39,11 @@ resize_window_to_full_screen() {
resize_to_true_full_screen() {
osascript <<-EOF
tell application "Alacritty"
tell application "alacritty"
activate
delay 0.5
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
delay 1
tell application "System Events" to tell process "alacritty"
keystroke "f" using {control down, command down}
end tell
end tell
EOF

View File

@ -7,7 +7,7 @@ start_terminal_and_run_tmux() {
osascript <<-EOF
tell application "kitty"
activate
delay 5
delay 1
tell application "System Events" to tell process "kitty"
set frontmost to true
keystroke "tmux"

View File

@ -9,7 +9,7 @@ start_terminal_and_run_tmux() {
osascript <<-EOF
tell application "Warp"
activate
delay 5
delay 1
tell application "System Events" to tell process "Warp"
set frontmost to true
keystroke "tmux"