Scripts quick access edit this

Synopsis Edit

Shrink or move windows to overlap with fewer others. This is the opposite of grow-pack.jl in a sense.

Description Edit

This package provides functions to shrink or yank a window in the four cardinal directions. Shrinking resizes the window by moving one of its edges and yanking moves the window to meet the following condition:

  • if the window was partially (or in case of yanking even entirely) outside the screen it will be entirely on the screen,
  • otherwise, if the window intersected with other windows it will intersect with one window less,
  • otherwise the window will not be moved or resized.

If the window reaches its minimum size before this condition can be satisfied the window is resized to the minimum size instead. There is also a minimum size constraint `shrink-window-minimum', which applies to all windows. However, it is measured in pixels and windows may actually become smaller than the specified value due to size truncation.

If the window would have to be yanked off the screen to satisfy the condition `yank-window-minimum-visible' pixels will be left visible instead.

Installation Edit

  • Put the script into a directory in your load-path.
  • (load "shrink-yank") in .sawfish/rc
  • Bind the commands {shrink,yank}-window-{left,right,up,down} to convenient keys. I use C-A-S-numpad for shrink and C-S-numpad for yank.
  • It is easy to move windows in unintended ways with these commands. I suggest you also install Undo.

Configuration Edit

The two special variables 'shrink-window-minimum-size' and 'yank-window-minimum-visible' default to 10 pixels. They can be modified with setq; no defcustoms are provided.

It's in Sawfish Edit

This script is adopted in Sawfish-1.5.0

Community content is available under CC-BY-SA unless otherwise noted.