> Euh... wait ... yes there is, the snap window on the Top, Left and Right

When I moved from Gnome Shell (which has that behaviour) back to Gnome
Classic, I was frustrated without that feature. But I recently found a
way that you can simulate the snapping.

1. install wmctrl
2. make the following executable scripts:

/home/[user]/bin/wm-left :
WIDTH=`xdpyinfo | grep 'dimensions:' | cut -f 2 -d ':' | cut -f 1 -d 'x' ` \
&& HALF=$(($WIDTH/2)) \
&& wmctrl -r :ACTIVE: -b remove,maximized_horz \
&& wmctrl -r :ACTIVE: -b add,maximized_vert \
&& wmctrl -r :ACTIVE: -e 0,0,0,$HALF,-1


/home/[user]/bin/wm-right :
WIDTH=`xdpyinfo | grep 'dimensions:' | cut -f 2 -d ':' | cut -f 1 -d 'x' ` \
&& HALF=$(($WIDTH/2)) \
&& wmctrl -r :ACTIVE: -b remove,maximized_horz \
&& wmctrl -r :ACTIVE: -b add,maximized_vert \
&& wmctrl -r :ACTIVE: -e 0,$HALF,0,$HALF,-1

3. If using Trisquel Gnome Classic, open System Settings > Keyboard >
Shortcuts
4. Add custom shortcuts. For example, Name='WM Left' and
Command='/home/[user]/bin/wm-left'. I used Mod4+Left to replicate what I
used in Gnome Shell.

If you play with the xdpyinfo command and create a HEIGHT variable you
should be able to do top, bottom and 3x3 grid snapping if you want.

-- 
Morne Alberts

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to