From 42c6ce8b438a4fe9b77131cb2e68d23fef41ff3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Mon, 18 Jan 2021 16:51:45 +0100 Subject: programs: Fix Firefox detection, add CSS toggle hotkeys --- tt.programs.ahk | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) (limited to 'tt.programs.ahk') diff --git a/tt.programs.ahk b/tt.programs.ahk index 78a2332..10844b6 100644 --- a/tt.programs.ahk +++ b/tt.programs.ahk @@ -35,12 +35,10 @@ WheelDown::Down F2::Gosub, TrayRebuild ; rebuild scripts.ahk -#IfWinActive ahk_class MozillaWindowClass +#IfWinActive ahk_exe firefox.exe ahk_class MozillaWindowClass -!s::^k ^'::^g -F3::SendInput, !{Left} -F4::SendInput, !{Right} + F1::SendInput, {WheelUp} F2::SendInput, {WheelDown} !F1:: @@ -52,6 +50,32 @@ Loop, 5 SendInput, {WheelDown} return +F3::SendInput, !{Left} +F4::SendInput, !{Right} + +; No stylesheet +F8::SendInput, {Alt}{Right}{Right}{Down}{Down}{Down}{Down}{Right}{Enter} +; First stylesheet +F9::SendInput, {Alt}{Right}{Right}{Down}{Down}{Down}{Down}{Right}{Down}{Enter} + +!F8:: +SendInput, {LButton}{LButton}{LButton}^f +Sleep, 100 +SendInput, {Alt}{Right}{Right}{Down}{Down}{Down}{Down}{Right}{Enter} +Sleep, 100 +SendInput, ^g{Delete}{Escape} +return +!F9:: +SendInput, {LButton}{LButton}{LButton}^f +Sleep, 100 +SendInput, {Alt}{Right}{Right}{Down}{Down}{Down}{Down}{Right}{Down}{Enter} +Sleep, 100 +SendInput, ^g{Delete}{Escape} +return + +; Default window size +F10::WinMove, A,,,, 1211, 1118 + #IfWinActive ahk_class KMeleon Browser Window F3::SendInput, !{Left} -- cgit v1.2.3