45

GitHub - ajgrf/edwina: Dynamic window manager for Emacs

 4 years ago
source link: https://github.com/ajgrf/edwina
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.org

Edwina

Edwina is a dynamic window manager for Emacs. It automatically arranges your Emacs panes (called “windows” in Emacs parlance) into predefined layouts, dwm-style.

Status

Edwina is new and experimental. While it works very well on the subset of Emacs that I use, you will definitely encounter bugs if you venture outside of that. Patches welcome!

Installation

Copy or clone Edwina somewhere on your system:

git clone https://github.com/ajgrf/edwina ~/.emacs.d/edwina

Then add its location to load-path:

(add-to-list 'load-path
             (expand-file-name "~/.emacs.d/edwina"))

Usage

Edwina divides the frame into 2 areas, the master area and the stack. The master area contains the largest window(s), and other windows are placed in the stack. Edwina tries to place the master area to the side, but if the frame is too narrow for 2 columns it will put it on top instead.

+-----------+---------+     +-----------+
|           |    1    |     |           |
|           +---------+     |  master   |
|  master   |    2    |     |           |
|           +---------+     +-----------+
|           |    3    |     |     1     |
+-----------+---------+     +-----------+

Edwina arranges windows according to just a few parameters: the size of the master area, the number of windows in master, the order of windows, and the current layout. By operating on these parameters instead of manually manipulating individual windows, you can greatly reduce the effort required to resize and reposition windows.

Key Bindings

By default these keys are prefixed with C-c C-w. Customize edwina-keymap-prefix to change the prefix.

BindingActionr, C-rArrange windowsn, C-n, SPCMove to next windowp, C-pMove to previous windowN, C-S-nSwap places with the next windowP, C-S-pSwap places with the previous window%, 5, {, [Decrease the size of the master area^, 6, }, ]Increase the size of the master aread, C-dDecrease number of windows in masteriIncrease number of windows in masterk, C-kDelete windowRETCycle window to/from master areac, C-cClone current window

See also (edwina-setup-dwm-keys) to set up alternative dwm-like key bindings, although these conflict with default Emacs bindings.

Scope

Edwina does not provide workspaces or window rules, instead delegating such functionality to other plugins and Emacs facilities (like eyebrowse).

I recommend setting display-buffer to open a new window by default, then defining any exceptions in display-buffer-alist.

(setq display-buffer-base-action '(display-buffer-below-selected))

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK