[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwin
Subject:    Re: Macro actions and key bindings
From:       Lubos Lunak <l.lunak () suse ! cz>
Date:       2008-11-28 9:21:48
Message-ID: 200811281021.48842.l.lunak () suse ! cz
[Download RAW message or body]

On Thursday 27 of November 2008, Guillaume Pothier wrote:
> On Thu, Nov 27, 2008 at 8:16 AM, Yannick Gingras <ygingras@ygingras.net> 
wrote:
> > The Wind has a 1024x600 integrated display.  That's a bit too small
> > vertically to fit a title bar and a taskbar so I bound a shortcut to
> > make a window fullscreen.  When working with the integrated display,
> > most of my windows end up in fullscreen mode.  My external monitor run
> > in 2050x1152.  As soon as I plug it, I want to see windows side by
> > side.  What I would like to do is:
> >  * exit fullscreen mode
> >  * show the window border and title bar (not always restored when
> >   coming back from full screen)

 This looks like a bug.

> >  * set the window to 1024 pixel wide
> >  * maximize window vertically
>
> Sounds to me like a good candidate for some kwin scripting. I see kwin
> has a dbus API but as far as I can tell it doesn't permit to get
> information/control individual windows. Maybe it would be a good idea
> to extend this API?

 No, no DBUS. There are windowmanager protocols that should work with all 
(compliant) window managers. They are accessible using the KWindowSystem 
class in libkdeui, so one could write a small C++ app for the task, or (I 
assume) e.g. script it in Perl/Python/Javascript using the KDE bindings for 
such languages. There is also a command-line tool called 'wmctrl' that does 
the same, although I've never used it myself.

 As for triggering these actions, I'm not aware of any automatic way of 
reacting to changed monitors. I guess one could create a shortcut for doing 
this manually (systemsettings->advanced->input actions), although that part 
has some problems in KDE4 (I fixed shortcuts too late for KDE4.1.3, so by now 
possibly only openSUSE packages have it, and I don't know if it's been fixed 
for KDE4.2 already).

 There is also the option of adding the mentioned support for scripting in 
KWin itself, but I suppose that is rather an overkill for this specific case 
(although it'd be nice to have it of course ;) ).

-- 
Lubos Lunak
KDE developer
--------------------------------------------------------------
SUSE LINUX, s.r.o.   e-mail: l.lunak@suse.cz , l.lunak@kde.org
Lihovarska 1060/12   tel: +420 284 028 972
190 00 Prague 9      fax: +420 284 028 951
Czech Republic       http://www.suse.cz
_______________________________________________
kwin mailing list
kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic