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.
Defined variables (38)
hycontrol--blank-buffer | Blank buffer to display in extra window grid windows. |
hycontrol--exit-status | Internal HyControl status indicator of how it was exited. |
hycontrol--fconfig | Used to store a frame configuration while in hycontrol. |
hycontrol--frames-prompt-format | HyControl frames-mode minibuffer prompt string to pass to format. |
hycontrol--initial-which-key-inhibit | Store value of ‘which-key-inhibit’ flag from "which-key" package, if any. |
hycontrol--prompt-format | The current HyControl mode help format string or nil if not active. |
hycontrol--quit-function | Store function to remove the transient-map later. |
hycontrol--screen-edge-position | Cycles between 0-7 representing corner and center edge positions. |
hycontrol--vnk-string | Prompt string for virtual numeric keypad (emulate keypad when not available). |
hycontrol--wconfig | Used to store a window configuration while in hycontrol. |
hycontrol--windows-prompt-format | HyControl windows-mode minibuffer prompt string to pass to format. |
hycontrol-arg | HyControl copy of ‘prefix-arg’ that it changes within key bindings. |
hycontrol-blank-buffer-name | Blank buffer name used for to display in extra window grid windows. |
hycontrol-debug | Whether some HyControl functions log debugging messages to *Messages*. |
hycontrol-display-buffer-predicate-list | List of single buffer/name predicates. |
hycontrol-frame-heights | List of height percentages to cycle through when adjusting a frame’s height. |
hycontrol-frame-offset | Increase in offset for new hycontrol frames relative to the selected frame. |
hycontrol-frame-widths | List of width percentages to cycle through when adjusting a frame’s width. |
hycontrol-frames-mode | Non-nil if Hycontrol-Frames mode is enabled. |
hycontrol-frames-mode-hook | Hook run after entering or leaving ‘hycontrol-frames-mode’. |
hycontrol-frames-mode-map | Keymap to use when in Hyperbole HyControl frames mode. |
hycontrol-help-flag | Non-nil means show key binding help in the minibuffer when in a HyControl mode. |
hycontrol-invert-mode-line-flag | Non-nil means invert mode-line to emphasize the special key bindings in effect. |
hycontrol-keep-window-flag | Non-nil means leave original window when tear off window to another frame. |
hycontrol-local-frames-mode | Non-nil if Hycontrol-Local-Frames mode is enabled. |
hycontrol-local-frames-mode-hook | Hook run after entering or leaving ‘hycontrol-local-frames-mode’. |
hycontrol-local-windows-mode | Non-nil if Hycontrol-Local-Windows mode is enabled. |
hycontrol-local-windows-mode-hook | Hook run after entering or leaving ‘hycontrol-local-windows-mode’. |
hycontrol-maximum-units | Maximum units setting allowed for hycontrol commands. |
hycontrol-screen-bottom-offset | Pixel offset from bottom used when placing a frame at a bottom corner. |
hycontrol-screen-left-offset | Pixel offset from left used when placing a frame at a left corner. |
hycontrol-screen-offset-alist | Alist of screen predicate offset pairs. |
hycontrol-screen-offset-sensitivity | Screen edge sensitivity in pixels. |
hycontrol-screen-right-offset | Pixel offset from right used when placing a frame at a right corner. |
hycontrol-screen-top-offset | Pixel offset from top used when placing a frame at a top corner. |
hycontrol-windows-mode | Non-nil if Hycontrol-Windows mode is enabled. |
hycontrol-windows-mode-hook | Hook run after entering or leaving ‘hycontrol-windows-mode’. |
hycontrol-windows-mode-map | Keymap to use when in Hyperbole HyControl window mode. |