Last active
January 11, 2026 10:55
-
-
Save orazdow/8d6cac9b03115edee041435b8c46c8ec to your computer and use it in GitHub Desktop.
ahk v2 nighlight, wintop, hidebar
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
| ;tray icon tooltip | |
| A_IconTip := "alt-l: nightlight`nalt-q: alt-f4`nctl-alt-up: winontop`nctl-alt-b: hidebar" | |
| ;*********** Alt-l : open night light *********************; | |
| !l:: Run "ms-settings:nightlight" | |
| ;*********** Alt-q : alt-f4 *********************; | |
| !q::Send "!{F4}" | |
| ;*********** Ctl-Alt-Up : pin window on top ***************; | |
| ^!Up:: WinSetAlwaysOnTop -1, "A" | |
| ;*********** Ctl-Alt-b : hide/show taskbar ****************; | |
| ^!b:: { | |
| static hide := 0 | |
| HideShowTaskbar(hide := !hide) | |
| } | |
| HideShowTaskbar(action) { | |
| static ABM_SETSTATE := 0xA, ABS_AUTOHIDE := 0x1, ABS_ALWAYSONTOP := 0x2 | |
| APPBARDATA := Buffer(size := 2*A_PtrSize + 2*4 + 16 + A_PtrSize, 0) | |
| NumPut("UInt", size, APPBARDATA), NumPut("Ptr", WinExist("ahk_class Shell_TrayWnd"), APPBARDATA, A_PtrSize) | |
| NumPut("UInt", action ? ABS_AUTOHIDE : ABS_ALWAYSONTOP, APPBARDATA, size - A_PtrSize) | |
| DllCall("Shell32\SHAppBarMessage", "UInt", ABM_SETSTATE, "Ptr", APPBARDATA) | |
| } |
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
| <svg class="svg-icon" style="width: 1em; height: 1em;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M524.8 938.666667h-4.266667a439.893333 439.893333 0 0 1-313.173333-134.4 446.293333 446.293333 0 0 1-11.093333-597.333334 432.213333 432.213333 0 0 1 170.666666-116.906666 42.666667 42.666667 0 0 1 45.226667 9.386666 42.666667 42.666667 0 0 1 10.24 42.666667 358.4 358.4 0 0 0 82.773333 375.893333 361.386667 361.386667 0 0 0 376.746667 82.773334 42.666667 42.666667 0 0 1 54.186667 55.04A433.493333 433.493333 0 0 1 836.266667 810.666667a438.613333 438.613333 0 0 1-311.466667 128z" /></svg> |
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
| #Requires AutoHotkey v2.0 | |
| ;tray icon tooltip | |
| A_IconTip := "alt-l: nightlight`nctl-alt-up: winontop`nctl-alt-b: hidebar" | |
| ;*********** Alt-l : open night light *********************; | |
| !l:: Run "ms-settings:nightlight" | |
| ;*********** Ctl-Alt-Up : pin window on top ***************; | |
| ^!Up:: WinSetAlwaysOnTop -1, "A" | |
| ;*********** Ctl-Alt-b : hide/show taskbar ****************; | |
| ^!b:: { | |
| static hide := 0 | |
| HideShowTaskbar(hide := !hide) | |
| } | |
| HideShowTaskbar(action) { | |
| static ABM_SETSTATE := 0xA, ABS_AUTOHIDE := 0x1, ABS_ALWAYSONTOP := 0x2 | |
| APPBARDATA := Buffer(size := 2*A_PtrSize + 2*4 + 16 + A_PtrSize, 0) | |
| NumPut("UInt", size, APPBARDATA) | |
| NumPut("Ptr", WinExist("ahk_class Shell_TrayWnd"), APPBARDATA, A_PtrSize) | |
| NumPut("UInt", action ? ABS_AUTOHIDE : ABS_ALWAYSONTOP, APPBARDATA, size - A_PtrSize) | |
| DllCall("Shell32\SHAppBarMessage", "UInt", ABM_SETSTATE, "Ptr", APPBARDATA) | |
| } | |
| ;*********** Remap AppsKey : RCtrl ************************; | |
| AppsKey::RCtrl | |
| ;*********** Ctrl+ F5/F6 : Mon brightness -/+ *************; | |
| ^F5::Run "ControlMyMonitor.exe /ChangeValue Primary 10 -2", , "Hide" | |
| ^F6::Run "ControlMyMonitor.exe /ChangeValue Primary 10 +2", , "Hide" | |
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
| ;tray icon tooltip | |
| A_IconTip := "alt-l: nightlight`nctl-alt-up: winontop`nctl-alt-b: hidebar" | |
| ;*********** Alt-l : open night light *********************; | |
| !l:: Run "ms-settings:nightlight" | |
| ;*********** Ctl-Alt-Up : pin window on top ***************; | |
| ^!Up:: WinSetAlwaysOnTop -1, "A" | |
| ;*********** Ctl-Alt-b : hide/show taskbar ****************; | |
| ^!b:: { | |
| static hide := 0 | |
| HideShowTaskbar(hide := !hide) | |
| } | |
| HideShowTaskbar(action) { | |
| static ABM_SETSTATE := 0xA, ABS_AUTOHIDE := 0x1, ABS_ALWAYSONTOP := 0x2 | |
| APPBARDATA := Buffer(size := 2*A_PtrSize + 2*4 + 16 + A_PtrSize, 0) | |
| NumPut("UInt", size, APPBARDATA), NumPut("Ptr", WinExist("ahk_class Shell_TrayWnd"), APPBARDATA, A_PtrSize) | |
| NumPut("UInt", action ? ABS_AUTOHIDE : ABS_ALWAYSONTOP, APPBARDATA, size - A_PtrSize) | |
| DllCall("Shell32\SHAppBarMessage", "UInt", ABM_SETSTATE, "Ptr", APPBARDATA) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment