Package: themizer
ThemizerAn easy and fast CLI app to change between custom themes in Unix-like systemsInstallation>pipinstallthemizer# Install with pip>themizer-v# Check if themizer has been installed correctlyUsageCreate a theme:>themizercreatefooApply a theme:>themizerapplybarApply the last used theme:When you not specify the theme to use themizer will try to use the last applied theme.>themizerapplyDelete a theme:>themizerdeletebazNote: you can use quotes for themes with spaces in its name. E.g.themizer apply 'Space Plumber'Creating a themeIf you create a theme and apply it directly it will raise this error:[ ERROR ] The theme config body is emptyThis happens because you should configure your theme manually, this little guide will help you in the process of create a new one.Theme structureAll the themes are saved in~/.config/themizer/themes/by default, and the structure of a theme looks like this:'theme-name/'
 ├── after-execute
 ├── before-execute
 ├── theme.config
 └── ...Directory / FileDescriptiontheme.configHere is stored all info about the theme and the instructions to apply it, more info below.before-executeThis file will be execute before Themizer actually moves the themes and applies it. Use its shebang to execute anything you want.after-executeThe same asbefore-executebut after the theme is actually applied.Configuration of the themeThetheme.configis spliced in two parts, the header and the body.The header:The header stores optional information about the theme itself and the body what directories should move from the theme and where they should go. Looking like this:[theme]# Header of the theme configname='custom_name'# The default name is the name of the directoryclear_terminal=true# By default is false, if is true the theme will clear the terminal after applying the themeThe body:The body is former for the relative path of the config to movetheme-name/super-configand the destination~/.config/super-app. Looking like this:['foobar']# Relative directory from the theme pathdest='~/.config/super-app'# Absolute path (can use ~to refer the home path)Example:Directory structure:foo-theme/├──after-execute├──before-execute├──theme.config├──fish/...# Some config for fish shell└──htop/...# Some config for htopConfiguration file:[theme]name='Kanagawa Theme'['fish']dest='~/.config/fish'['htop/htop.config']dest='~/.htop'When you runthemizer apply 'Kanagawa Theme'themizer will executebefore-script, copyfoo-theme/fish/to~/.config/fish/, copyfoo-theme/htop.configto~/.htopand finally executeafter-script.Note: The subdirectorythemewill not work correctly as its name is used to refer the header of the configuration.'ConfigurationYour configuration directory is located by default in~/.config/themizer/.Custom config pathYou can use your custom path for the config using--config:> themizer --config /path/to/config/directoryScriptingYou can automatize all the things you can do with Themizer this way:fromthemizerimportApptheme_manager:App=App()# You can also set a custom config pathfrompathlibimportPathcustom_theme_manager:App=App(Path('/your/custom/path/'))TheAppclass has this set of useful methods to interact with Themizer:MethodDescriptionapply_theme(theme_name: str)Apply an existing theme. Leave theme_name None to try to use the last theme applied. Return the theme applied.create_theme(theme_name: str)Create a new theme.delete_theme(theme_name: str)Delete an existing theme.move_theme_configOnly moves the directories indicated in the theme and not run the 'before' and 'after' scripts.run_before_script(theme_name: str)Run the 'before' script of the selected theme.run_after_script(theme_name: str)Run the 'after' script of the selected theme.get_theme_config(theme_name: str)Return all the config of the theme.get_theme_config_head(theme_name: str)Return the head of the config of the theme.get_theme_config_body(theme_name: str)Return the body of the config of the theme.get_themes_dict)Return a dict with the names of all themes and its internal object.set_last_theme_used(theme_name: str)Set the last theme to a custom one.get_last_theme_used)Return the last theme used by the user.get_clear_terminal(theme_name: str)Return if the theme selected should clear the terminal.ContributingFeel free to report a bug or request a branch merge, I appreciate any contribution.AuthorCreated with :heart: byKutu.GitHub -kutu-devTwitter -@kutu_dev