tracexec icon indicating copy to clipboard operation
tracexec copied to clipboard

[Feature] Custom theme for TUI

Open kxxt opened this issue 1 year ago • 2 comments

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 avatar May 10 '24 04:05 kxxt

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 avatar May 14 '24 10:05 kxxt

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.

kxxt avatar May 14 '24 23:05 kxxt