File: hycontrol.el.html
This library provides full interactive control of window and
frame sizes and locations utilizing quick single key commands.
It has the ability to change from increasing a window height by
5 lines, {.5 h}, to moving a frame 82 pixels, {.82 right-arrow},
with just a few keystrokes (the leading . just resets the numeric
argument to 0 prior to typing the new number).
See the Info manual entry "(hyperbole)HyControl" for reference
documentation. See below for key usage information.
----
HyControl is invoked via either of two global minor modes under
the Hyperbole screen menu, both of which can toggle to the other
by pressing {t}. hycontrol-enable-frames-mode bound to {C-h h s
f} manages visible frame creation, deletion, sizing, position and
face zooming (enlarging and shrinking); if called interactively,
it stores the current frame configuration for restoration via a
press of the ) key. hycontrol-enable-windows-mode manages
per frame window creation, deletion, sizing, reframing and face
zooming; if called interactively, it stores the current window
configuration for restoration via a press of the ) key.
hycontrol-enable-windows-mode is typically bound by Hyperbole
to {C-c \ } or just use {C-h h s w}. Then press {t} if you want
to switch to frame control.
With a HyControl minor mode active, a multi-line help summary of
most available key bindings is shown in the minibuffer. Simply
read this and try each command out to get a feel for it. Below
we highlight some of the most unique commands.
----
In either HyControl mode, you can instantly create a grid of
windows to display many buffers by choosing a number of rows as
your first digit, then a number of columns of windows as the
second digit and then pressing {@}, e.g. {.26 @} produces 2 rows,
each with 6 columns of windows in the selected frame. Grids can
be from 1x1 to 9x9 windows. This command also works outside of a
HyControl mode when in Dired, Buffer Menu or IBuffer modes with
a prefix argument (no preceding period).
The buffers displayed by the {@} command are chosen smartly.
With a current buffer in Dired, Buffer Menu or IBuffer mode with
marked items, the buffers associated with those items are
displayed first. Then the most recently used buffers are
displayed in each window, first selecting from buffers which
match any of the predicate expressions in
hycontrol-display-buffer-predicate-list. Then, if there are
not enough buffers for all windows, the buffers that failed to
match to any predicate are used. The default predicate list
chooses buffers with attached files. In all cases, buffers whose
names start with a space are filtered out. If a prefix argument
of 0 is given, a major mode symbol is prompted for and buffers
with that major mode are preferred for display instead of those
matching the predicate list.
----
HyControl allows placement of frames at screen edges and corners
using the keys of the numeric keypad, matching their physical
layout, e.g. {3} moves to the lower right corner. Press {p} for
a prompt with a virtual numeric keypad if you lack a physical one.
You can also cycle through all of these placement positions with
the {c} key.
HyControl can rapidly resize frames to common percentages of
screen sizes via a number of commands. Each press of {a} or {A}
cycles through resizing the selected frame's width and height
respectively to a percentage of the screen given by the lists,
hycontrol-frame-widths and hycontrol-frame-heights, e.g. 25%,
50%, etc. The keys: {i} top, {j} left, {k} right, and {m}
bottom, first maximize a frame to the respective screen edge and
then with successive presses, shrink the frame dimension
perpendicular to that edge by 50% while keeping the original edge
fixed in place. Try them and you will quickly see how they can
help.
----
When HyControl creates a new frame, it automatically sizes it to the
same size as the previously selected frame and offsets it from that
frame by the (X . Y) number of pixels given in the variable,
hycontrol-frame-offset.
A display screen may span multiple physical monitors. To prevent
widgets and toolbars at the corners of the screen from being
obscured, HyControl can offset each frame from each screen edge
by a fixed number of pixels. These offsets are specified by the
variable, hycontrol-screen-offset-alist and can differ for each
type of screen; see its documentation for details. If you change
its value, then call hycontrol-set-screen-offsets to set any
new offset values. hycontrol-get-screen-offsets returns the
list of offsets in clockwise order starting from the top edge.