Window Resizer

This is a tool for resizing and positioning the active window in the X window system.

Usage $ sudo gem install colszowka-window_resizer

Please note that you need to have the wmctrl package installed. On Debian-based systems, installing can be done with sudo apt-get install wmctrl

For a list of available commands, type: $ resize_current_window --help

Examples

Place window in the center of the screen, using 85% of available height and width (a.k.a. defaults): resize_current_window

Place window at the left screen border, make it use full height and half width: resize_current_window --left -x 0.5 -y 1.0

Place window in the upper right corner, make it use 50% height and width: resize_current_window --top -x 0.5 -y 0.5

Place window in the upper right corner, make it use 50% height and width: resize_current_window --top -x 0.5 -y 0.5

Place window in the lower right corner, make it use 50% height and width: resize_current_window --bottom -x 0.5 -y 0.5

Place window centered at the bottom of the screen, make it use 50% height and 100% width: resize_current_window --bottom -x 1.0 -y 0.5

Keybindings in Gnome

On my machines, I have the following key bindings set up:

</p>
<ol>
	<li>Window resizer keybindings
gconftool-2 —set /apps/metacity/keybinding_commands/command_9 —type string “/usr/bin/resize_current_window”
gconftool-2 —set /apps/metacity/global_keybindings/run_command_9 —type string “<Alt><Shift>Down”
gconftool-2 —set /apps/metacity/keybinding_commands/command_10 —type string “/usr/bin/resize_current_window —left -x 0.55 -y 1.0”
gconftool-2 —set /apps/metacity/global_keybindings/run_command_10 —type string “<Alt><Shift>Left”
gconftool-2 —set /apps/metacity/keybinding_commands/command_11 —type string “/usr/bin/resize_current_window —right —top -x 0.44 -y 0.45”
gconftool-2 —set /apps/metacity/global_keybindings/run_command_11 —type string “<Alt><Shift>Up”
gconftool-2 —set /apps/metacity/keybinding_commands/command_12 —type string “/usr/bin/resize_current_window —right —bottom -x 0.44 -y 0.45”
gconftool-2 —set /apps/metacity/global_keybindings/run_command_12 —type string “<Alt><Shift>Right”

You can run this set of commands in your command line (CAUTION: this will overwrite existing keybindings for the named commands!), and afterwards will be able to “tile” your current screen using <Alt><Shift>(Down|Left|Up|Right). Feel free to customize the settings to your needs :)

To learn about keybindings in Gnome with gconf-editor, you can also have a look at: http://www.linuxformat.co.uk/wiki/index.php/Setting_Key_Bindings_in_GNOME

Copyright

window_resizer is Copyright © 2009 Christoph Olszowka, It is free software, and may be redistributed under the terms specified in the MIT-LICENSE file.