From f4965eeac235bdb73d2d0cacc2126f15a43198d4 Mon Sep 17 00:00:00 2001 From: Alex Reece Date: Fri, 14 Jun 2013 20:00:09 -0400 Subject: [PATCH] Get foreground window 30% faster Thanks micampe! --- modules/notify/functions/focused_window_id | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/notify/functions/focused_window_id b/modules/notify/functions/focused_window_id index e7c63e2f..1377a69f 100644 --- a/modules/notify/functions/focused_window_id +++ b/modules/notify/functions/focused_window_id @@ -6,12 +6,8 @@ case "$OSTYPE" in (darwin*) - osascript -e 'tell application "System Events" to ¬' \ - -e ' set focus_app_name to ¬' \ - -e ' name of first application process ¬' \ - -e ' whose frontmost is true' \ - -e 'tell application focus_app_name to ¬' \ - -e ' get id of front window' + osascript -e 'tell application (path to frontmost application as text) ¬' \ + -e ' to get id of front window' ;; (linux-gnu*) # http://stackoverflow.com/a/8688624/447288