Created
March 15, 2025 18:27
-
-
Save bendytree/48faf9d112cf2e5d5903f4d7bb402635 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- In Better Touch Tool, set this Apple Script to run when Zed.app launches | |
delay 0.5 | |
tell application "System Events" | |
tell process "Zed" | |
if exists menu item "Exit Full Screen" of menu "View" of menu bar 1 then | |
click menu item "Exit Full Screen" of menu "View" of menu bar 1 | |
end if | |
end tell | |
end tell | |
delay 0.5 | |
-- Get screen dimensions | |
tell application "Finder" | |
set screenBounds to bounds of window of desktop | |
end tell | |
set screenWidth to item 3 of screenBounds | |
set screenHeight to item 4 of screenBounds | |
-- Define right 1/3 position and size | |
set newWidth to screenWidth / 3 | |
set newX to screenWidth - newWidth | |
set newY to 0 | |
-- Resize and move Zed window | |
tell application "System Events" | |
tell process "Zed" | |
if exists window 1 then | |
set position of window 1 to {newX, newY} | |
set size of window 1 to {newWidth, screenHeight} | |
end if | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment