Define a custom shortcut for Compiz Window Manager

Ralf Mardorf silver.bullet at zoho.com
Fri Apr 22 18:24:25 UTC 2016


What does manipulate the X and Y values in the below script?
The script should keep those values, since nothing does change them.

$ win75 
0 80
4 130
$ win75 -
4 130
8 180
$ cat /usr/local/bin/win75 
#!/bin/dash
eval $(xdotool getwindowgeometry --shell $(xdotool getactivewindow))
WIDTH=$(calc "int($WIDTH*0.75)")
case $1 in
  "") HEIGHT=$(calc "int($HEIGHT*0.75)");
esac
wmctrl -i -r $WINDOW -b remove,maximized_vert,maximized_horz
echo $X $Y
wmctrl -i -r $WINDOW -e "0,$X,$Y,$WIDTH,$HEIGHT"
eval $(xdotool getwindowgeometry --shell $(xdotool getactivewindow))
echo $X $Y
exit

I changed the string in the wmctrl command, but the result is the same.

wmctrl -i -r $WINDOW -e 0,$X,$Y,"$WIDTH,$HEIGHT"




More information about the ubuntu-users mailing list