Scripts quick access edit this |
- Author: Timo Korvola
- Version: 1.10
- License: GPL
- Download: Shrink-yank (adopted).jl (upload)
- Homepage: http://www.iki.fi/tkorvola/hacks/
Synopsis[]
Shrink or move windows to overlap with fewer others. This is the opposite of grow-pack.jl in a sense.
Description[]
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[]
- 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[]
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[]
This script is adopted in Sawfish-1.5.0