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

Add "user" tab to themes kitten #5150

Merged
merged 2 commits into from
May 31, 2022
Merged

Add "user" tab to themes kitten #5150

merged 2 commits into from
May 31, 2022

Conversation

jimbob3806
Copy link
Contributor

Purpose

Add new tab named "user" to the built-in themes kitten - new tab filters and displays only user-defined color themes, and ignores all themes defined in the kitty-themes repository (https://github.com/kovidgoyal/kitty-themes)

Useful for:

  • restricting search results to display user-defined themes without the userhaving to resort to naming themes using a custom prefix such as "@my-custom-theme.conf"
  • easily visually browsing user-defined themes given that there are now well over 200 themes in the kitty-themes repository
  • easily finding user-defined duplicates/modifications of existing themes

Remarks

  • pull request also replaces a duplicate hard coded tab string with an equivalent reference which was defined elsewhere in the same file

Remove hard coded tab string and replace with self.tabs, which is
a reference to the same tab string defined in the __init__ of
ThemesHandler
Add new tab named "user" to the built-in themes kitten - new tab
filters and displays only user-defined color themes, identified by
adding "is_user_defined" property to "Theme" class which defaults
to False, and is set True when a theme is fetched using the
"load_from_dir" method.
@kovidgoyal kovidgoyal merged commit 761a941 into kovidgoyal:master May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants