an0nym0u5 / growl

Automatically exported from code.google.com/p/growl
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Disable Growl when user-selected applications are active #171

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What feature or enhancement do you propose?
The Growl preference pane should have a list of applications (empty by default, 
populated by the user) that Growl will check the active application against. 
Whenever one of the listed applications is active, Growl will not display any 
notifications.

Furthermore, the Growl status item should include a menu item stating why Growl 
is suppressing itself when this is the case.

What problem does it solve/What benefit does it provide?
This solves the problem of Growl notifications coming in over full-screen 
applications, such as movie players and video games: The user can simply add 
these applications to the list.

Original issue reported on code.google.com by prhgr...@gmail.com on 21 Nov 2010 at 3:32

GoogleCodeExporter commented 8 years ago
This might be good in 1.4.

Original comment by chrisf.g...@gmail.com on 11 Aug 2011 at 6:04

GoogleCodeExporter commented 8 years ago

Original comment by chrisf.g...@gmail.com on 11 Aug 2011 at 6:27

GoogleCodeExporter commented 8 years ago

Original comment by ch...@growl.info on 14 Nov 2011 at 12:43

GoogleCodeExporter commented 8 years ago

Original comment by ch...@growl.info on 14 Nov 2011 at 5:48

GoogleCodeExporter commented 8 years ago
I am happy to implement this feature, if Chris - you have not already started 
work on it.

For further information, see: 
http://groups.google.com/group/growl-development/browse_thread/thread/ed2121c465
35d61c#

Original comment by robertso...@gmail.com on 17 Nov 2011 at 9:40

GoogleCodeExporter commented 8 years ago
Ya man, definitely ok with me. Swing by irc and we can chat about details. :)

Original comment by ch...@growl.info on 18 Nov 2011 at 2:33

GoogleCodeExporter commented 8 years ago

Original comment by ch...@growl.info on 19 Jan 2012 at 10:45

GoogleCodeExporter commented 8 years ago
Hi Chris,

Uni finals and all that stuff has caught up with me. It won't be until the 
summer (at the earliest) that I might get round to looking at this. :(

Thanks

Original comment by robertso...@gmail.com on 19 Jan 2012 at 10:49

GoogleCodeExporter commented 8 years ago
Ping me via email when you're available :)

Original comment by ch...@growl.info on 20 Jan 2012 at 5:43

GoogleCodeExporter commented 8 years ago
Flagging as started.  Growl 2.0 improves our idle checker by allowing us to be 
considered idle when certain application bundle id's are in the foreground, We 
still lack a UI to configure this though.  This can be easily extended into 
pausing visual display when certain apps are active, and possibly a seperate 
list.

Original comment by dan...@growl.info on 13 Apr 2012 at 4:56

GoogleCodeExporter commented 8 years ago
Expose a UI for this in a later version.

Original comment by ch...@growl.info on 18 Jul 2012 at 5:19

GoogleCodeExporter commented 8 years ago
Expose this in the applications tab. Required for 2.1.

Original comment by ch...@growl.info on 2 Oct 2012 at 8:40

GoogleCodeExporter commented 8 years ago

Original comment by rarich...@gmail.com on 19 Oct 2012 at 5:21

GoogleCodeExporter commented 8 years ago

Original comment by rarich...@gmail.com on 19 Oct 2012 at 5:21

GoogleCodeExporter commented 8 years ago

Original comment by ch...@growl.info on 20 Feb 2013 at 5:20

GoogleCodeExporter commented 8 years ago
As a kind of a side note, this can also be done under the rules system coming 
in 2.1 on 10.8 systems, still not as good as a user facing UI, but for 
documentation's sake, here is a quick Rules script that would do this if 
QuickTime or VLC were in the foreground.

using terms from application "Growl"
    on evaluate notification with notification
        tell application "System Events"
            set appName to item 1 of (get name of processes whose frontmost is true)
        end tell
        if appName is in {"QuickTime Player", "VLC"} then
            return {display:none}
        end if
    end evaluate notification
end using terms from

Original comment by dan...@growl.info on 29 Apr 2013 at 11:44

GoogleCodeExporter commented 8 years ago
Can Growl Detect when an app is using the OS X full screen mode?

Original comment by applelive4 on 30 Apr 2013 at 2:13

GoogleCodeExporter commented 8 years ago
Short answer, no.  There are too many different ways of achieving full screen, 
not all of which are detectable.  And those that are detectable probably aren't 
considered ok under sandboxing

Long answer, the rules system coming in 2.1 using Applescript should be able to 
determine this for the specific case of Lion's fullscreen system.  Here is a 
rules script that has the basics for checking that type of thing.  The key 
value you are looking for is that attribute "AXFullScreen".  If it finds a full 
screen app is frontmost, it tells Growl to display using Music Video

using terms from application "Growl"
    on evaluate notification with notification
        set isFull to false
        try
            tell application "System Events" to tell (first process whose frontmost is true)
                set isFull to (value of attribute "AXFullScreen" of window 1)
            end tell
        end try
        if isFull then
            return {display:"Music Video"}
        end if
    end evaluate notification
end using terms from

This method isn't really available to us under sandboxing within Growl itself, 
and I haven't tested this one for how reliable it is (I just had mail in full 
screen and it worked)

Original comment by dan...@growl.info on 30 Apr 2013 at 2:52

GoogleCodeExporter commented 8 years ago
Apologies for never getting round to implementing this Chris and Dan. Things 
always crop up.

I'd agree that the rules method is probably the best way to go at the moment. I 
certainly won't be able to work on a UI anytime soon.

About detecting full screen, here's a method I use to detect full screen 
workspaces (but as you say it may not work apps that go full screen in the 
current space:

-(int)isFullScreenWorkspace {
    CFArrayRef windows = CGWindowListCopyWindowInfo(kCGWindowListOptionOnScreenOnly | kCGWindowListExcludeDesktopElements, kCGNullWindowID );
    CFIndex i, n;
    int is_full_screen = 0;
    for (i = 0, n = CFArrayGetCount(windows); i < n; i++) {
        CFDictionaryRef windict = CFArrayGetValueAtIndex(windows, i);
        CFNumberRef layernum = CFDictionaryGetValue(windict, kCGWindowLayer);
        if (layernum) {
            int layer;
            CFNumberGetValue(layernum,  kCFNumberIntType, &layer);
            if (layer == -1) {
                is_full_screen = 1;
                break;
            }
        }
    }
    CFRelease(windows);
    return is_full_screen;
}

Original comment by robertso...@gmail.com on 30 Apr 2013 at 3:26