fix warp process casing

pull/134/head
Dimitar Nizamov 2024-01-19 21:27:33 +01:00
parent 9c1f1ce839
commit 40d6ad94af
1 changed files with 12 additions and 11 deletions

View File

@ -3,12 +3,13 @@
# for "true full screen" call the script with "fullscreen" as the first argument
TRUE_FULL_SCREEN="$1"
start_warp_and_run_tmux() {
start_Warp_and_run_tmux() {
osascript <<-EOF
tell application "warp"
tell application "Warp"
activate
delay 1
tell application "System Events" to tell process "warp"
delay 2
tell application "System Events" to tell process "Warp"
set frontmost to true
keystroke "tmux"
key code 36
end tell
@ -18,10 +19,10 @@ start_warp_and_run_tmux() {
resize_window_to_full_screen() {
osascript <<-EOF
tell application "warp"
tell application "Warp"
activate
tell application "System Events"
if (every window of process "warp") is {} then
if (every window of process "Warp") is {} then
keystroke "n" using command down
end if
@ -29,8 +30,8 @@ resize_window_to_full_screen() {
set desktopSize to bounds of window of desktop
end tell
set position of front window of process "warp" to {0, 0}
set size of front window of process "warp" to {item 3 of desktopSize, item 4 of desktopSize}
set position of front window of process "Warp" to {0, 0}
set size of front window of process "Warp" to {item 3 of desktopSize, item 4 of desktopSize}
end tell
end tell
EOF
@ -38,10 +39,10 @@ resize_window_to_full_screen() {
resize_to_true_full_screen() {
osascript <<-EOF
tell application "warp"
tell application "Warp"
activate
delay 1
tell application "System Events" to tell process "warp"
tell application "System Events" to tell process "Warp"
keystroke "f" using {control down, command down}
end tell
end tell
@ -49,7 +50,7 @@ resize_to_true_full_screen() {
}
main() {
start_warp_and_run_tmux
start_Warp_and_run_tmux
if [ "$TRUE_FULL_SCREEN" == "fullscreen" ]; then
resize_to_true_full_screen
else