Movie demo
https://youtu.be/-JxuZTldSpQ
Thouht most of DE's already come up with snapping funtion i find it unfuntional to snap windows by edgeding the mouse against the sides, so the best way to snap the windows is by using hotkeys shortcurts.
Steps:
1- sudo apt-get install wmctrl
2- My proposal --> Create 4 hotkey shortcuts for each function snapping:
2.1--> Snapping to left side (Control+SHIFT+ Left Cursor)
2.2--> Snapping to right side (Control+SHIFT+ Right Cursor)#!/bin/sh
wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz &
WIDTH=`xdpyinfo | grep 'dimensions:' | cut -f 2 -d ':' | cut -f 1 -d 'x'` && HALF=$(($WIDTH/2)) && wmctrl -r :ACTIVE: -b add,maximized_vert && wmctrl -r :ACTIVE: -e 0,0,0,$HALF,-1
2.3--> Snapping to Maximum screen (Control+SHIFT+ Up Cursor)#!/bin/sh
wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz &
WIDTH=`xdpyinfo | grep 'dimensions:' | cut -f 2 -d ':' | cut -f 1 -d 'x'` && HALF=$(($WIDTH/2)) && wmctrl -r :ACTIVE: -b add,maximized_vert && wmctrl -r :ACTIVE: -e 0,$HALF,0,$HALF,-1
2.4--> Restore Window (Control+SHIFT+ Down Cursor)#!/bin/sh
wmctrl -r :ACTIVE: -b add,maximized_vert,maximized_horz
I find this proposal really agile and very usefull, i always install wmctrl.#!/bin/sh
wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz
Enjoy