💭 Mock-up of a panel manager for mutt
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE.md
Makefile
README.md
bool.h
gfx.c
gfx.h
log.c
log.h
main.c
notify.h
panel.c
panel.h
rect.c
rect.h
signal.c
signal.h

README.md

Panel Manager

What is it?

This is a sample application to demonstrate a mechanism to divide up screen real estate. The panels can be fixed, or variable, width/height. Their visibility can also be toggled.

I wrote it to remind myself how ncurses windows work and to demonstrate how I'd like to carve up the screen space -- separating out the graphics code.

Why?

At the moment, mutt puts all of its information in one big window. Occasionally, this window is split in two. All the components of mutt draw directly onto the screen at fixed locations.

Throughout the mutt code there are hard-coded references to the curses variables: COLS, LINES. Also, many component write text at fixed positions on the screen.

Panels

To implement a sidebar, currently you must alter every piece of code that writes to column 0.

Ideally, every component should be given coordinates describing the piece of screen it has been allocated. If the screen changes (e.g. is resized) then the component would be signalled and given new coordinates.

Curses windows can enforce limits on where text is drawn, preventing interference between components.

Controls

Button Action
s Toggle sidebar
i Toggle index
p Toggle pager
h Toggle help page
x Swap the side of the sidebar
q Quit

Who?

flatcap

License

The code is released under the GPLv3. See LICENSE.md for more details.