/rw

Resize windows on macOS/Windows

Primary LanguageAutoHotkeyMIT LicenseMIT

Resize windows on macOS/Windows

Usage

Symbol Key
hyper ctrl +opt + cmd
ctrl +win + alt
hyperShift hyper + shift
  • Center current window. hyper + C
  • Move to edges
    • Left - hyper + Home
    • Right - hyper + End
    • Top - hyper + PgUp
    • Down - hyper + PgDn
  • Base size is 1.33x1 screen height (4:3 window). Loop through 1, 0.9, 0.7, 0.5 and 0.3. hyper + M
  • Maximize current window. hyperShift + M
  • Vertical half screen size. hyperShift + Left or Right
  • Horizontal half screen size. hyperShift + Up or Down
  • Loop through 3/4, 3/5, 1/2, 2/5, 1/4 screen width. hyper + Left or Right
  • Loop through 3/4, 1/2 and 1/4 screen height. hyper +Up or Down
  • Move current window to another monitor. hyper + J or K

For testing:

  • Alert. hyper + W
  • Notify. hyperShift + W

macOS - Hammerspoon

Download here or brew install hammerspoon.

Then symlink the configuration file:

bash mac/install.sh

Windows - AutoHotkey v1

Download here or winget install -s msstore --accept-package-agreements "AutoHotkey Store Edition".

If you want the program to start automatically at startup, see here.

Or run the following codes:

$WshShell = New-Object -comObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut("$ENV:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\rw.lnk")
$Shortcut.TargetPath = "$Home\Scripts\rw\win\init.ahk"
$Shortcut.Save()

# start "$ENV:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup"

Ideas

Hammerspoon section comes from this post.

Size looping like spectacle.

AHK section comes from here.