Option to exclude dialog window?

129 views
Skip to first unread message

Flint

unread,
Jul 16, 2012, 4:24:14 AM7/16/12
to devil...@googlegroups.com
Hello.

I have this rule in place to force all app windows to start up minimized, except for Terminal window.

if (get_application_name() ~= "Terminal") then
   minimize();
end

Problem is if I open any child windows such as Preferences or Options dialog of any apps, the rule above will be applied to them as well.

I figure I could exclude these windows by their type but we don't have the option for [1] matching window by type (dialog, modal etc) yet I hope this will be added soon, along with bunch other missing options from the original devilspie

But in some cases, filtering windows by their type isn't enough..for example

Debug output:

Window Name: Adblock Plus Filter Preferences
Application name: Firefox
^C

This preferences window is neither dialog nor modal. So, perhaps you can add [2] an option that returns the application name that is currently in focus, too? So we can construct rules to whitelist any child windows that belong to the application we are working in

Thanks



Andreas Rönnquist

unread,
Jul 30, 2012, 5:42:22 AM7/30/12
to devil...@googlegroups.com
On Mon, 16 Jul 2012 01:24:14 -0700 (PDT)
Flint <stalk...@gmail.com> wrote:

> Hello.
>
> I have this rule in place to force all app windows to start up
> minimized, except for Terminal window.
>
> if (get_application_name() ~= "Terminal") then
> minimize();
> end
>
> Problem is if I open any child windows such as Preferences or Options
> dialog of any apps, the rule above will be applied to them as well.
>
> I figure I could exclude these windows by their type but we don't
> have the option for [1] matching window by type (dialog, modal etc)
> yet I hope this will be added soon, along with bunch other missing
> options from the original devilspie

Sorry for the late reply - I've been away on vacation the last weeks.
Anyway - I will implement this right away - Something like

if (get_window_type()=="WINDOW_TYPE_DIALOG") then

will do, right? - See

http://developer.gnome.org/libwnck/stable/WnckWindow.html#WnckWindowType

for a list of the types this will be able to return.


>
> But in some cases, filtering windows by their type isn't enough..for
> example
>
> Debug output:
>
> Window Name: Adblock Plus Filter Preferences
> > Application name: Firefox
> > ^C
> >
>
> This preferences window is neither dialog nor modal. So, perhaps you
> can add [2] an option that returns the application name that is
> currently in focus, too? So we can construct rules to whitelist any
> child windows that belong to the application we are working in

Hmm, I'll need to investigate this - A quick look at the libwnck stuff
I don't find anything suitable, but I need to look further.

best regards, and thanks
/Andreas
gus...@gusnan.se

Andreas Rönnquist

unread,
Jul 30, 2012, 2:28:59 PM7/30/12
to devil...@googlegroups.com
On Mon, 16 Jul 2012 01:24:14 -0700 (PDT)
Flint <stalk...@gmail.com> wrote:

Alright, I have implemented

get_window_class
get_window_xid
get_window_role

and

get_window_property

in the git version (Are you using the latest git version?)

I believe those are the ones that were missing that are available in
the original devilspie.

I hope this solves most difficulties - However - I still need to find
a good solution to the second problem you mentioned above...

best regards
/Andreas
gus...@gusnan.se
signature.asc
Reply all
Reply to author
Forward
0 new messages