在特定屏幕位置启动新的 Chrome 窗口 (Mac OS X)

fad*_*fad 5 google-chrome macos

我大部分时间都在屏幕右下角打开 Chrome,并且主要使用选项卡。有时我需要一个新的 Chrome 窗口(实例)并点击 cmd-n。现在新窗口总是在左上角打开,我必须将其居中。有没有办法自动居中新的 chrome 窗口(或者最大化它们..)?

小智 4

如果您愿意,可以使用 AppleScript 来完成此操作。在系统偏好设置的通用访问部分下启用“辅助设备访问”后,您可以使用以下 applescript 来创建一个新窗口并调整其大小:

tell application "Google Chrome" to activate

tell application "System Events"
    tell process "Google Chrome"
        click menu item "New Window" of menu "File" of menu bar 1
    end tell
end tell

tell first window of application "Google Chrome" to set bounds to {0, 0, 800, 800}
Run Code Online (Sandbox Code Playgroud)

这将创建一个大小为 800x800 的新窗口,窗口的左上角位于屏幕的左上角。然后,有很多方法可以将 applescript 连接到键盘快捷键。