Closed XeonG closed 3 years ago
Even better if 'toggle' buttons can get there visual status based on the command setting.. ie Active/Inactive states.
That seems like a good feature but a bit complex to implement. I will look into this.
+1 on this idea. I just skimmed the code of this extension, and in reality isn't it just mapping a "label" that's displayed to the user to a command? Should be easy enough to accept this from a settings JSON obj. By reading from the settings, it actually exponentially increases the versatility because the customizations can take place at the workspace level and can be changed accordingly.
Ex. the following extension is similar to this except in the statusbar and takes the buttons from a user provided config (and is completely customizable, including icon): // vsc marketplace https://marketplace.visualstudio.com/items?itemName=fabiospampinato.vscode-commands // repo for same ext if you want to browse the code https://github.com/fabiospampinato/vscode-commands
mfurey has contributed $50.00 to this issue on Rysolv.
The total bounty is now $50.00. Solve this issue on Rysolv to earn this bounty.
I'd try to add this in the following way:
boolean
option (defaulting to false) use a string
configuration for it (defaulting to null/empty)workbench.action.tasks.runTask|My Task
)This allows anyone to setup up to 9 (or more if you want more) self-defined actions and as those are normal settings can also be tied to the workspace.
@GorvGoyl Are you ok with this approach (or see any issue with this)? If not I'd start hacking.
@GorvGoyl Second question (which would be unrelated to my PR): would you be ok to replace the current boolean
setting in general with the suggested string
option? To disable a menu entrr people would then have to empty the command, to enable use the "set to default" option.
@GitMensch thanks for digging, I think we can maintain both Boolean for the buttons provided by extension and String option for user-defined commands. I'm quite tied up at this time would it be possible to test this method? I found 2 extensions doing something similar: https://github.com/AnWeber/vscode-statusbar-command , https://github.com/Gruntfuggly/activitusbar
I'm quite tied up at this time would it be possible to test this method?
Yes, if you are fie with that approach I'd try it for user-defined ones. Depending on work-load and family I may start next week, but I'd really like to know up-front that you'd pull if the approach does work.
Yes, if you are fie with that approach I'd try it for user-defined ones. Depending on work-load and family I may start next week, but I'd really like to know up-front that you'd pull if the approach does work.
I would gladly accept if it works!
I would gladly accept if it works!
Works fine here :-) if possible I'd love to see this in a new release (including on open-vsx which is the extension provider I primarily use), possibly with the other PRs. Thanks!
released on vscode marketplace. Publishing on open-vsx is in pipeline
Something like the lines of supporting something like https://marketplace.visualstudio.com/items?itemName=hoovercj.vscode-settings-cycler
ie the most common type of button I'd want being a toggle of some other plugins setting or command..