Created
August 9, 2022 15:38
-
-
Save emmhaych/75efc9e68f55269d7e910b5d0a6ee371 to your computer and use it in GitHub Desktop.
Split the screen in areas on a single ultrawide screen (Using autohotkey)
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
| ;-------------------- | |
| ; Ultrawide Screen Splitter -- by emmhaych | |
| ;-------------------- | |
| ; | |
| ; Split the screen in areas on a single ultrawide screen | |
| ; Supported windowing concepts are: | |
| ; | 25% | 50% | 25% | - Use hotkey Windows+Ctrl+Left/Right/Up | |
| ; | 30% | 30% | 30% | - Use hotkey Windows+Left/Right/Up | |
| ;_______________________________________________________________________ | |
| #Left:: | |
| MoveWindowLaterally(3, 0) | |
| Return | |
| #^Left:: | |
| MoveWindowLaterally(4, 0) | |
| Return | |
| #Up:: | |
| MoveWindowLaterally(3, 1) | |
| Return | |
| #^Up:: | |
| MoveWindowLaterally(4, 1, 2) | |
| Return | |
| #Right:: | |
| MoveWindowLaterally(3, 2) | |
| Return | |
| #^Right:: | |
| MoveWindowLaterally(4, 3) | |
| Return | |
| ; ScreenDiviWindowDivisionssions - the number of windows to split the screen in | |
| ; Index - positions the window laterally - value of 0 puts the window to the extreme left | |
| ; OccupiedDivisions - number of divisions the window should occupy | |
| MoveWindowLaterally(WindowDivisions, Index, OccupiedDivisions=1) | |
| { | |
| WindowWidth := A_ScreenWidth/WindowDivisions | |
| X := Index*WindowWidth | |
| WinGetPos,,,,TrayHeight,ahk_class Shell_TrayWnd,,, | |
| WinMove,A,,X,0,WindowWidth*OccupiedDivisions,A_ScreenHeight-TrayHeight | |
| Return | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment