kxxt / tracexec

Tracer for execve{,at} and pre-exec behavior, launcher for debuggers.
GNU General Public License v2.0
262 stars 3 forks source link

[Feature] Custom theme for TUI #18

Open kxxt opened 4 months ago

kxxt commented 4 months ago

Currently TUI is already theme-able at compile time. It would be nice to theme it at runtime by loading configuration files(TOML should be fine). And I want to make several themes.

Note that themes can also be installed system-wide.

kxxt commented 4 months ago

For now the theme is a global static variable. To implement custom themes, it need to be loaded from main func.

Unfortunately this would require static mut variable. But anyway I don't want to pass a reference to theme around in the code base.

kxxt commented 4 months ago

Themes should be loaded from ProjectDirs::data_dir()/themes first (user level themes) and if not found then path_to_tracexec_binary/../share/tracexec/themes.