Gruntfuggly / activitusbar

A VSCode extension to save some real estate by recreating the activity bar buttons on the status bar
Other
114 stars 15 forks source link

Exclude if extension is not enabled #32

Closed DrKGD closed 4 years ago

DrKGD commented 4 years ago

Is it possible to exclude an icon from appearing if the given extension is not enabled? I really enjoy the customability of VSCode Workspaces, but I'd really prefer to prevent the icon from being there instead of having it doing nothing at all.

Also, is it possible to have an "empty, non-activable space" as an Icon? { "name":"", "codicon": "kebab-vertical" }, immagine

Gruntfuggly commented 4 years ago

I'm not sure if it is possible to detect if an extension is enabled or not. Have you tried putting alternative configurations in the workspace settings for each workspace?

I'll add an option to include a gap of some sort.

DrKGD commented 4 years ago

Have you tried putting alternative configurations in the workspace settings for each workspace?

It actually is a clever idea, did not think of it beforehand (d'oh!). It indeed works, sorry for bothering you!

Would be cooler if it was possible to check for the availability of an extension, but I really do not know how to possibly do that (you know, one single config to edit and move around all the time...).

Gruntfuggly commented 4 years ago

No problem. I believe there is some functionality in the pipeline to determine which views have been moved into the activity bar - this might unlock this capability.

DrKGD commented 4 years ago

I was thinking, is there any primitive capabilities in JSON to "append to an array"? So, instead of replacing "activitusbar.views" everytime in every workspace we just append to it?

Gruntfuggly commented 4 years ago

There's nothing in JSON to do that, but I could add a flag to the extension to tell it to merge the settings from workspace into the user setting (which I think is possible). That way you could have a base set and then just additional sets where you need them.

DrKGD commented 4 years ago

Thank you very much for your attention and keep up the good work! I will patiently wait for an update 👀.

Gruntfuggly commented 4 years ago

I've just uploaded a version which supports separators (use an empty {} in the view list, or specify an icon if you want) and also supports combining the settings - put your base set in user settings, and additional ones in workspace settings.

Gruntfuggly commented 4 years ago

Currently you can't add separators in the workspace settings when combining, but I'll fix that shortly.

DrKGD commented 4 years ago

Uhm, just pulled the new update, empty spaces do work as expected (thank you!), still having problems setting up the base-addtional settings.

As I understood should be easy as that in the base settings: immagine

And this for the workspace settings immagine

Gruntfuggly commented 4 years ago

Ah sorry - I forgot to say that you need to enable activitusbar.combineWorkspaceSettings ! By default it overrides, which is the existing behaviour.

DrKGD commented 4 years ago

I see, it works as intended now! immagine

If you do not mind I can go ahead and close this thread.