Skip to content

Commit

Permalink
Close modern Skype and Photos apps
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBestPessimist committed Feb 5, 2020
1 parent d502d47 commit 332bd40
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
7 changes: 7 additions & 0 deletions WinTitles.ahk
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class WinTitles
{
static ModernApp := "ahk_class ApplicationFrameWindow ahk_exe ApplicationFrameHost.exe"

static ModernSkype := [ModernApp, "Skype"]
static ModernPhotos := [ModernApp, "Photos"]
}
4 changes: 3 additions & 1 deletion appHandling_autoExecute.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ global ahk_sublime := "ahk_exe sublime_text.exe"
global ahk_telegram := "ahk_exe telegram.exe ahk_class Qt5QWindowIcon"
global ahk_vlc := "ahk_exe vlc.exe"
global ahk_tf2 := "ahk_exe hl2.exe"
global ahk_modern_photos := ["ahk_class ApplicationFrameWindow ahk_exe ApplicationFrameHost.exe", "Photos"]
global ahk_intellij_idea := "ahk_exe idea64.exe"
global ahk_goland := "ahk_exe goland64.exe"
global ahk_teamviewer_sponsoredsession := "Sponsored session ahk_exe TeamViewer.exe"
Expand All @@ -20,5 +19,8 @@ SetTimer, hideTeamviewerSponsoredsession, 5000






; 2018.09.07: no need for this as sublime text is licensed now!
; SetTimer, hideSublimeRegister, 1000
12 changes: 9 additions & 3 deletions app_handling.ahk
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
;-------------------------------------------------
#Include WinTitles.ahk



;-------------------------------------------------
; CapsLock sublime text
CapsLock & s::
runSublimeText(){
Expand Down Expand Up @@ -217,11 +221,13 @@ hideTeamviewerSponsoredsession() {

;-------------------------------------------------
; use just F4 to close some windows
#If WinActive(ahk_telegram)
#If false
|| WinActive(ahk_telegram)
; || WinActive(ahk_chrome)
; || WinActive(ahk_firefox)
|| WinActive(ahk_vlc)
|| WinActive(ahk_modern_photos[1], ahk_modern_photos[2])
|| WinActive(WinTitles.ModernPhotos*)
|| WinActive(WinTitles.ModernSkype*)
|| WinActive(ahk_teamviewer)
|| WinActive(ahk_CorsairCUE)
|| WinActive(ahk_Skype)
Expand Down

0 comments on commit 332bd40

Please sign in to comment.