Skip to content

Instantly share code, notes, and snippets.

@unhammer
Created April 8, 2013 13:41
Show Gist options
  • Save unhammer/5336830 to your computer and use it in GitHub Desktop.
Save unhammer/5336830 to your computer and use it in GitHub Desktop.
window-left/right
#!/bin/sh
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
#!/bin/sh
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment