Skip to content

Instantly share code, notes, and snippets.

@orazdow
Last active January 11, 2026 10:55
Show Gist options
  • Select an option

  • Save orazdow/8d6cac9b03115edee041435b8c46c8ec to your computer and use it in GitHub Desktop.

Select an option

Save orazdow/8d6cac9b03115edee041435b8c46c8ec to your computer and use it in GitHub Desktop.
ahk v2 nighlight, wintop, hidebar
;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)
}
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#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"
;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