summaryrefslogtreecommitdiff
path: root/_windows/ahk/capslock.ahk
diff options
context:
space:
mode:
authorkkard2 <[email protected]>2026-05-07 18:00:21 +0200
committerkkard2 <[email protected]>2026-05-07 18:00:21 +0200
commite69fce27eeae3419bd33ace5e514efd910e4e2ac (patch)
tree670aa2fcc1721931198dce4a76f5ff7eb496c4be /_windows/ahk/capslock.ahk
parentb44b1125990fbd5bbf773d04c0cd4747ad6f7011 (diff)
cleanup
Diffstat (limited to '_windows/ahk/capslock.ahk')
-rw-r--r--_windows/ahk/capslock.ahk70
1 files changed, 0 insertions, 70 deletions
diff --git a/_windows/ahk/capslock.ahk b/_windows/ahk/capslock.ahk
deleted file mode 100644
index 0f03daf..0000000
--- a/_windows/ahk/capslock.ahk
+++ /dev/null
@@ -1,70 +0,0 @@
-#Requires AutoHotkey v2
-#SingleInstance Force
-
-CapsLock::Esc
-
-SetKeyDelay 1
-
-global CurrentDesktop := 1
-
-ShowCurrentWindows() {
- titles := []
- text := ""
-
- hwnds := WinGetList()
- for hwnd in hwnds {
- ; skip tool windows
- style := DllCall("GetWindowLongPtr", "Ptr", hwnd, "Int", -20, "Ptr")
- WS_EX_TOOLWINDOW := 0x80
- if style & WS_EX_TOOLWINDOW
- continue
-
- title := WinGetTitle("ahk_id " hwnd)
- if title = ""
- continue
-
- titles.Push(title)
- text .= title
- text .= "`n"
- }
- ToolTip text, 0, 0
- SetTimer ToolTip, -1000
-}
-
-SwitchDesktop(num) {
- global CurrentDesktop
- While CurrentDesktop > num {
- SendEvent "{Ctrl down}{LWin down}{Left}{LWin up}{Ctrl up}"
- CurrentDesktop--
- }
- While CurrentDesktop < num {
- SendEvent "{Ctrl down}{LWin down}{Right}{LWin up}{Ctrl up}"
- CurrentDesktop++
- }
- ShowCurrentWindows()
-}
-
-!1::SwitchDesktop(1)
-!2::SwitchDesktop(2)
-!3::SwitchDesktop(3)
-!4::SwitchDesktop(4)
-!5::SwitchDesktop(5)
-!6::SwitchDesktop(6)
-!7::SwitchDesktop(7)
-!8::SwitchDesktop(8)
-!9::SwitchDesktop(9)
-!0::SwitchDesktop(10)
-
-~^#Left::{
- global CurrentDesktop
- if (CurrentDesktop > 1)
- CurrentDesktop--
-}
-
-~^#Right::{
- global CurrentDesktop
- if (CurrentDesktop < 10)
- CurrentDesktop++
-}
-
-RCtrl & Backspace::Reload