4.1. Overview¶
The main component is alot.ui.UI
, which provides methods for user input and notifications, sets up the widget
tree and maintains the list of active buffers.
When you start up alot, init.py
initializes logging, parses settings and commandline args
and instantiates the UI
instance of that gets passes around later.
From its constructor this instance starts the urwid
mainloop
that takes over.
Apart from the central UI
, there are two other “managers” responsible for
core functionalities, also set up in init.py
:
ui.dbman
: aDBManager
to access the email database andalot.settings.settings
: aSettingsManager
oo access user settings
Every user action, triggered either by key bindings or via the command prompt, is
given as commandline string that gets translated
to a Command
object which is then applied
.
Different actions are defined as a subclasses of Command
, which live
in alot/commands/MODE.py
, where MODE is the name of the mode (Buffer
type) they
are used in.