The name is chosen after Messenger Hawk
from the Avatar: The Last Airbender animated series.
Messenger hawks are merely proxies between two communicating parties, which perfectly describes the purpose of Mehawk:
A proxy which displays information sent by another people on some specific messaging platform in an overlay form.
-
Programming language - C++20 with:
- dpp 10.0.23 (patched version that allows for self-botting)
- spdlog 1.11.0
- opengl 4.6:
- glfw 3.3.8
- glad 0.1.36
- catch2 3.2.0
- libassert v1.1
- efsw v1.3.1
-
Build system - Meson >= 0.63.0
-
Utility:
- Nix 2.16.1
- Just 1.13.0
The rendering parts of the app are handled by glfw and glad. There's no GUI library, all rendering is done by hand using OpenGL with these two libraries.
The discord communication is done with a patched version of dpp, although there are plans to move to a custom, smaller version.
Testing is done via catch2.
Other utility libraries include:
- spdlog for nice logs
- libassert for nice asserts
- expected for C++23's actually working
<expected>
- optional for a better optional with monadic operations
- magic_enum for useful enum operations, mostly used in tests
Mehawk is supposed to be an overlay application for many services. For now only IRC, Discord and Matrix are planned.
The main mehawk interface of mehawk is supposed to be the GUI. It is however supposed to be possible to carry out some actions using the command-line interface.
For now:
- Executing some queries and modifications on the config.
- Sending commands to the running notification and overlay daemon.
For now it is unclear if support for each platform is going to be implemented with plugins (luajit/cyber/buzz/steel/X) or directly in C++.
Mehawk should have a hot-reloadable config in form of a TOML
file.
The config should be editable from an additionally spawned GUI window,
but there is also supposed to be a watch, which would reload on config file changes
(assuming the config is correct, if not, an error should arise).
The UI is supposed to be transparent and oblivious to mouse input, unless a certain global key combination is pressed. If it is, input mode is activated, in which the window is focused and responds to both mouse and key inputs.
In the input mode, the user would be able to use vim-like keybindings to navigate the view.
The UI is supposed to be flexible and allow the user for creating it's own layouts (for example, the user may wish to see active participants in currently joined discord voice chat on the left, as well as a matrix chat along some discord channel chat).
Images, gifs, videos, files, and all other embeds are together called embeddables. By default they are hidden behind their own label (<image>, <gif>, etc.), but can be enabled to be displayed in the settings.
All platform specific formatting (bolds, italics, spoilers, etc.) should be respected.
Some parts of the rendered output can also be altered by custom themes provided by the user, format to be decided later.
Mehawk should be also able spawn a custom notification daemon. It is useful if, for example, someone wishes to have Do Not Disturb status on discord, which completely removes notifications, but waits for response/message from some channels.
The notifications should be highly customizable.
It is still undecided, but mehawk will possibly have an ability to type and send basic messages for various sources.
Pings should reside at the top of the overlay for a chosen period of time.
This is only a vague overview of the architecture and some matters I need to figure out myself. The general plan and specifics are subject to constant changes.
Main Mehawk
class
Figure out:
- Font rendering.
- Hot-reloading.
- File watching (NOTE: Symlinks are not supported. I will consider adding support once users request.)
- Layout system.
- The kernel architecture and plugin system.
https://nullderef.com/blog/plugin-tech/ https://www.12factor.net/