Last active
May 11, 2020 14:58
-
-
Save gutierri/6820ba002faf661270a424e4e8411e5f to your computer and use it in GitHub Desktop.
ratpoison like on Windows 10 (s+j)
This file contains 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
; reference for key-binds default | |
; nongnu ratpoison ~ https://www.nongnu.org/ratpoison/doc/Default-Key-Bindings.html | |
powered() { | |
Input, OutputVar, L1 m | |
Switch Asc(OutputVar) { | |
; ctlr-j | | |
Case 124: | |
; TODO: only maximized | |
WinRestore, A | |
SendInput #{Left} | |
; ctlr-j S | |
Case 83: | |
; TODO: only without maximized | |
WinGetPos, winWidth, winHeight, , , A ; "A" to get the active window's pos. | |
if ( winWidth == -9 and winHeight == -9) { | |
WinRestore, A | |
} | |
SendInput #{Left} | |
SendInput {Esc} | |
SendInput #{Up} | |
; ctlr-j Q | |
Case 81: | |
WinMaximize, A | |
; ctlr-j n | |
Case 110: | |
SendInput {Alt down}{Tab}{Alt up} | |
; ctlr-j p | |
Case 112: | |
SendInput {Alt down}{Shift down}{Tab}{Shift up}{Alt up} | |
; ctlr-j space | |
Case 32: | |
SendInput #s | |
; ctlr-j P (jump prev desktop) | |
Case 80: | |
SendInput #^{Left} | |
; ctlr-j N (jump next desktop) | |
Case 78: | |
SendInput #^{Right} | |
; ctlr-j K (kill current 'frame') | |
Case 75: | |
SendInput {Alt down}{F4}{Alt up} | |
; ctrl-j return (open terminal) | |
Case 10: | |
Run, alacritty.exe | |
Default: | |
MsgBox, % Asc(OutputVar) | |
} | |
} | |
#j::powered() | |
Return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment