From e1bd223c51b20dcdb56445b108f41714e0f67836 Mon Sep 17 00:00:00 2001 From: Gotbletu Date: Thu, 27 Sep 2012 22:19:00 -0700 Subject: [PATCH] old aero snap script --- aerosnap_script.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 aerosnap_script.sh diff --git a/aerosnap_script.sh b/aerosnap_script.sh new file mode 100644 index 0000000..169aa4c --- /dev/null +++ b/aerosnap_script.sh @@ -0,0 +1,18 @@ +# This is the old school aero snap script for linux +# make sure to install wmctrl & xdpyinfo (included in 'x11-utils' package on ubuntu) +# Just make 3 script and make it executable, then make keybinding for each + +#--------- Left + +#!/bin/bash +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 + +#--------- Right + +#!/bin/bash +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 + +#--------- Top + +#!/bin/bash +wmctrl -r :ACTIVE: -b add,maximized_vert,maximized_horz