-
Notifications
You must be signed in to change notification settings - Fork 0
/
bindings.ahk
98 lines (84 loc) · 2.43 KB
/
bindings.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
; general key bindings for Windows
; For some reason, this needs to be alone in its own script to be reliable...
;Capslock::Esc ; remap the capslock key to escape
; reload this script (Win+Shift+c)
#+c::
Traytip, 'reloading key bindings', %A_ScriptName%,,
Reload
return
; close windows with Win+Shift+q
#+q::
WinClose A
return
; lock the display with Ctrl+Alt+l
^!l::
DllCall("LockWorkStation")
return
ClipNotify(){
Traytip, 'copied to clipboard:', %clipboard%,,
}
; open calc in WSL and Windows Terminal instead of the useless Windows calculator app
Launch_App2::
; wrap in bash to get the nice readline prompts
;Run, wt "C:\WINDOWS\system32\wsl.exe" -d Arch -u joe --cd ~ -- bash -c units -v1
Run, wt "C:\WINDOWS\system32\wsl.exe" -d Arch -u joe --cd ~ -- units -v1
;Run, wt "C:\WINDOWS\system32\wsl.exe" -d Arch -u joe --cd ~ -- calc
return
; copy the date to the clipboard Win+Shift+i
#+i::
FormatTime, CurrentDateTime,, yyyy-MM-dd
clipboard=%CurrentDateTime%
ClipNotify()
return
; wrapper for equivalize (Win+Shift+=)
#+=::
RunWait, "%SYSTEMDRIVE%\Program Files\Git\git-bash.exe" "src/dotfiles/bin/equivalize-win.sh", %SYSTEMDRIVE%%HOMEPATH%,
ClipNotify()
return
; fullscreen a window with Win+f
#f::Send {F11} ; It would be nice to actually control the active window instead of remapping like this, but oh well...
; remove annoying window properties with Win+Shift+f
#+f::
WinSet, AlwaysOnTop, Off, A
WinSet, Enable, , A
WinActivate, A
WinSet, Redraw, , A
return
; adjust transparency up and down with Win+F9 and Win+F8
#F9::
WinGet, TransLevel, Transparent, A
if (TransLevel = OFF) {
TransLevel := 255
}
newTrans := TransLevel+25
if (newTrans > 255){
newTrans := "OFF"
}
WinSet, Transparent, %newTrans%, A
return
; super+shift+F9 for full opacity
#+F9::
WinGet, TransLevel, Transparent, A
WinSet, Transparent, OFF, A
return
; super+F8 to reduce opacity
#F8::
WinGet, TransLevel, Transparent, A
if (TransLevel = OFF) {
TransLevel := 255
}
newTrans := TransLevel-25
if (newTrans < 0){
newTrans := 0
}
WinSet, Transparent, %newTrans%, A
return
; Ctrl+Alt+mouseForward to toggle left-mouse on and off
; pressing left-mouse also untoggles by sending a button-up event
^!XButton2::
if (GetKeyState(LButton))
SendInput { LButton up }
else
SendInput { LButton down }
return
return