Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Custom theme for TUI #18

Open
kxxt opened this issue May 10, 2024 · 2 comments
Open

[Feature] Custom theme for TUI #18

kxxt opened this issue May 10, 2024 · 2 comments

Comments

@kxxt
Copy link
Owner

kxxt commented May 10, 2024

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 kxxt added enhancement New feature or request good first issue Good for newcomers priority-low tui TUI difficulty-easy labels May 10, 2024
@kxxt
Copy link
Owner Author

kxxt commented May 14, 2024

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
Copy link
Owner Author

kxxt commented May 14, 2024

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 kxxt added this to the 0.5 milestone May 26, 2024
@kxxt kxxt self-assigned this May 26, 2024
@kxxt kxxt removed the good first issue Good for newcomers label May 26, 2024
@kxxt kxxt removed their assignment Jul 17, 2024
@kxxt kxxt removed this from the 0.5 milestone Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant