Define a custom shortcut for Compiz Window Manager

Ralf Mardorf silver.bullet at
Fri Apr 22 15:15:52 UTC 2016

On Sat, 23 Apr 2016 00:12:32 +1000, Karl Auer wrote:
>   #!/bin/bash

I prefer dash over bash, it's faster and more compatible.

>   WIN=$(xdotool getactivewindow)
>   eval $(xdotool getwindowgeometry --shell $WIN)

The WIN variable isn't needed.
eval $(xdotool getwindowgeometry --shell $(xdotool getactivewindow))

Just change $WIN to $WINDOW:

>   WIDTH=$(calc "int($WIDTH*0.75)")
>   wmctrl -i -r $WIN -b remove,maximized_vert,maximized_horz
>   wmctrl -i -r $WIN -e "0,-1,-1,$WIDTH,-1"

More information about the ubuntu-users mailing list