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

Separate some plugins from themes #97

Open
JanPokorny opened this issue May 22, 2019 · 7 comments
Open

Separate some plugins from themes #97

JanPokorny opened this issue May 22, 2019 · 7 comments

Comments

@JanPokorny
Copy link

Some plugins (like ssh, z, or aliases) are controlled by the theme file, but have nothing to do with theming. Current state of themes makes no sense in this regard, eg. agnoster enables ssh and z, but agnoster-alternate doesn't. I believe that the on/off switches for these plugins should be in the config, independent of the theme file.

@chawyehsu
Copy link
Collaborator

Those bundled themes are for basic usage. If you want to config plugins for a theme, you can make a copy of the theme to ~/.config/pshazz/themes/ then edit it by yourself.

@JanPokorny
Copy link
Author

I understand that. I just don't see the logic in including this behavior in the theme file. It took me some time to understand why "z" worked on one theme and didn't on other. In my opinion, behavioral plug-ins (z, ssh etc.) should be configured separately from theme plugins (git, hg...). It is more intuitive, and allows for easier theme changing -- at this point, if I want to use a cool new theme I find on the internet, I would need to copy parts of config from the old one.

@chawyehsu
Copy link
Collaborator

Hm, I get your point. You want plugins to be independent of themes, but the problem is some themes depends on some plugins. For instance, one has designed a theme which requires ssh plugin. And if the plugins part is independent, then other users cannot use the theme out of the box. They have to look into the theme and find out which plugin should be enabled, and then enable it manually. Therefore, IMO, it's a matter of choice to separate plugin loading system from themes.

@JanPokorny
Copy link
Author

Is that really an issue?

When I look into the plugins, I see some behavioral plugins that I can't see themes depending on, like aliases (they need some config, but it's behavior only), g, ssh, and z. (Can you give an example how would a theme depend on the ssh plugin?)

And some theme-related plugins that make no sense to be enabled separately -- dircolors (ok that one may make sense to be enabled separately, but the color definitions are still logically part of the theme), git, hg, resetcolor, svn, virtualenv -- they just expose new variables for themes or do some theme-related work.

These are two fundamentally different types of "plugins" we are talking about, the first providing functionality to the console user, the second providing functionality to the theme creator.

In my opinion, including the first group in the theme settings is confusing. I think that g, ssh, and z should be by default a part of the pshazz core, enabled by default, and just have an on/off switch in the settings. (Idk what to do with "aliases", I personally don't see the point when there is Set-Alias...)

@JanPokorny
Copy link
Author

To add, a thing I really like about pshazz is the fish-like experience of "install, select theme, done". I was so happy to find it after tinkering with Oh-My-Posh, Posh-Git, ssh agent etc. for so long. I believe that this proposed change goes with the philosophy.

@chawyehsu
Copy link
Collaborator

chawyehsu commented May 22, 2019

Okay, it makes sense to have an independent plugin loading system in some way. But I think that's really not a good idea to integrate plugins into the core and enable them by default. It's no doubt that it will save you time when you want those ssh/g/z plugins.

Thinking about that when someone wants to change to the mircosoft theme for a vanilla environment, on the other side, it will take their time to switch those plugins off. Then if they want to change back to the fancy theme, they have to enable those plugins again. And you see that it does not satisfy "install, select theme, done". That's what I said the matter of choice.

But yeah, perhaps it needs a better way to deal with some high-frequency uses plugins, though actually many users don't face the problem because they often have their own theme with their own plugins, instead of those built-in themes.

@JanPokorny
Copy link
Author

JanPokorny commented May 22, 2019 via email

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

2 participants