Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Howto: Windows Agile Snapping

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Howto: Windows Agile Snapping

#1 Post by bester69 »

Howto to snap windows in an agile way

Image

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)
#!/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.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,$HALF,0,$HALF,-1
2.3--> Snapping to Maximum screen (Control+SHIFT+ Up Cursor)
#!/bin/sh
wmctrl -r :ACTIVE: -b add,maximized_vert,maximized_horz
2.4--> Restore Window (Control+SHIFT+ Down Cursor)
#!/bin/sh
wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz
I find this proposal really agile and very usefull, i always install wmctrl.


Enjoy :wink:
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: Howto: Windows Agile Snapping

#2 Post by bester69 »

bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: Howto: Windows Agile Snapping

#3 Post by bester69 »

I'll add two more i also use


2.5--> Snapping to 4/3 left side (Control+SHIFT+ N)
#!/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*4/3)),-1
2.6--> Snapping to 4/3 right side (Control+SHIFT+ M)
#!/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*2/3)),0,$(($HALF*4/3)),-1
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

Post Reply