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

View File

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

View File

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