Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Shell script to control your window via `wmctrl` and `xbindkeys`, like Divvy or Spectacle for Mac OS X.
Shell
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README.md
control

README.md

control

Shell script to control your window via wmctrl and xbindkeys. Basically, some functionality I was missing when moving over from Mac OS over to Ubuntu this past week offered by Spectacle

Install dependencies

sudo apt-get install wmctrl xbindkeys

Get the code

git clone git@github.com:davidjairala/control.git

Usage

You can use the following options to resize the active window:

  • qtl - quarter top left
  • qtr - quarter top right
  • qbl - quarter bottom left
  • qbr - quarter bottom righ
  • mt - mid top
  • mb - mid bottom
  • ml - mid left
  • mr - mid right
  • f - full
./control qtl
./control ml
./control f

The real usefulness of the script comes when combined with xbindkeys tho, explained below.

Edit ~/.xbindkeysrc

Whenever you edit your ~/.xbindkeysrc make sure you restart xbindkeysrc itself.

My config looks something like:

##################################
# End of xbindkeys configuration #
##################################

##########
# wmctrl #
##########

"/home/davidjairala/projects/wmctrl/control qtl"
  control + alt + Left

"/home/davidjairala/projects/wmctrl/control qtr"
  control + alt + Right

"/home/davidjairala/projects/wmctrl/control qbl"
  control + shift + alt + Left

"/home/davidjairala/projects/wmctrl/control qbr"
  control + shift + alt + Right

"/home/davidjairala/projects/wmctrl/control f"
  control + alt + Mod4 + f

"/home/davidjairala/projects/wmctrl/control mt"
  control + alt + Mod4 + Up

"/home/davidjairala/projects/wmctrl/control mb"
  control + alt + Mod4 + Down

"/home/davidjairala/projects/wmctrl/control ml"
  control + alt + Mod4 + Left

"/home/davidjairala/projects/wmctrl/control mr"
  control + alt + Mod4 + Right

Enjoy!

Next time you log in, you'll be able to control your active window's position via the keyboard thanks to wmctrl and xbindkeys!

Something went wrong with that request. Please try again.