A few year ago I wanted to achieve the snap window function in Lubuntu 14.04. I think you need openbox for this to work.
Take a look at https://github.com/lawl/opensnap
Below is a summary of the installation procedure quoted from that page:
Installing
If you want to install opensnap
from source first make sure you have git installed. (Or fetch a zip file: https://github.com/lawl/opensnap/archive/master.zip)
Fetch via git:
git clone https://github.com/lawl/opensnap.git
Fetch via zip:
wget https://github.com/lawl/opensnap/archive/master.zip
unzip master.zip
Make sure you have all prerequisites:
sudo apt-get install build-essential libx11-dev libgtk-3-dev wmctrl
And finally build and install it:
cd opensnap*
make
sudo make install
And now start opensnap with
opensnap
or
opensnap --deamon
if you want it to daemonize.
If I remember well, there was a bug when trying to unsnap the snapped window. Take a look at https://github.com/lawl/opensnap/issues/4 there is a workaround described.
In my case Lubuntu 14.04 I had to modify /home/user/.config/openbox/lubuntu-rx.xml
The code between the tags <mousebind button="Left" action="Drag">
and </mousebind>
has to be exchanged by:
<mousebind button="Left" action="Drag">
<!-- Unsnap if snapped-->
<action name="if">
<maximizedvertical>yes</maximizedvertical>
<then>
<action name="Unmaximize"/>
<direction>vertical</direction>
<action name="MoveResizeTo">
<x>center</x>
<!-- we center windows in order to mitigate discrepancies
between window placement and mouse cursor -->
<y>current</y>
</action>
<action name="Move"/>
</then>
<else>
<action name="Move"/>
</else>
</action>
</mousebind>
Make sure that you are inside the tags of <context name="Titlebar">
Best Answer
I had the same problem after upgrading to 16.04 from 15.10. I was able to solve it as follows:
you might have to install it via
I had installed it previously already in 14.04.