Define a custom shortcut for Compiz Window Manager

Karl Auer kauer at biplane.com.au
Fri Apr 22 07:45:02 UTC 2016


On Fri, 2016-04-22 at 08:55 +0200, Ralf Mardorf wrote:
> On Fri, 22 Apr 2016 12:57:09 +1000, Karl Auer wrote:
> > wmctrl -i -r <ID> -e -1,-1,-1,w,h
>                       ^^ this must be 0.

According to the man page, values passed as -1 are left as is. Reading
it carefully, that may only apply to the window dimensions, not to the
gravity. 0 is the default; that may not be the current value. I'm
pretty sure it can be values other than zero, but I bow to anyone who
actually knows :-)

> Using wmctrl with apps started by e.g. a launcher is tricky.

It seems to work best with the current active window, however started.
I experimented using a terminal and changing the window title; I was
totally puzzled until I realised that the terminal prompt rewrote the
window title :-)

> I'll explain a few issues, why I guess it's not the appropriate tool
> 
> The good news, this works. The bad news, it works only if the Windows
> isn't maximised. How can a window be "un"maximised?

Dunno. It may also be related to your specific window manager - window
managers are free to ignore stuff they don't like. Maybe use xdotool
instead?

> wmctr -l can recognised them by "rocketmouse at archlinux:"
> How can I find out which window is focused?

xdotool getactivewindow

> $ xdotool getwindowgeometry
> There are no windows in the stack

What do you get with "xdotool getactivewindow"? I always get a window
ID (in decimal) that I can plug straight into wmctrl.

I think these two commands have great promise, but as I said, I've
never really used them. It's up to the OP to try them out and see if he
can make them do what he wants :-)

Regards, K.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)
http://www.biplane.com.au/kauer
http://twitter.com/kauer389

GPG fingerprint: E00D 64ED 9C6A 8605 21E0 0ED0 EE64 2BEE CBCB C38B
Old fingerprint: 3C41 82BE A9E7 99A1 B931 5AE7 7638 0147 2C3C 2AC4







More information about the ubuntu-users mailing list