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

Expose in the API whether Zen Mode is enabled #89278

Closed
sketchbuch opened this issue Jan 25, 2020 · 9 comments
Closed

Expose in the API whether Zen Mode is enabled #89278

sketchbuch opened this issue Jan 25, 2020 · 9 comments
Assignees
Labels
api feature-request Request for new features or functionality *out-of-scope Posted issue is not in scope of VS Code workbench-zen Full screen 'Zen' view issues
Milestone

Comments

@sketchbuch
Copy link

I think it would be great if extension developers had a way in the API to find out if Zen Mode is currently enabled, or add an event that fires when Zen Mode is toggled.

@vscodebot
Copy link

vscodebot bot commented Jan 25, 2020

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@sketchbuch sketchbuch changed the title Expose whether Zen Mode is enabled in the API Expose in the API whether Zen Mode is enabled Jan 25, 2020
@usernamehw
Copy link
Contributor

usernamehw commented Jan 26, 2020

Might be related: #10471

There's a when context inZenMode but it's only available from some places; like keybindings or menus.

@sketchbuch
Copy link
Author

sketchbuch commented Jan 26, 2020

I'm not sue if it is related, but it looks interesting too. Would the 10471 give extensions acess to check if VSC is in Zen Mode? Is ZenMode status stored in context

@jrieken jrieken assigned isidorn and unassigned jrieken Jan 27, 2020
@isidorn isidorn added api workbench-zen Full screen 'Zen' view issues feature-request Request for new features or functionality labels Jan 27, 2020
@isidorn isidorn added this to the Backlog milestone Jan 27, 2020
@isidorn
Copy link
Contributor

isidorn commented Jan 27, 2020

This is a fair feature request. HOwever we do not currently have it on the plan, thus assignig to the backlog.

@hediet
Copy link
Member

hediet commented Feb 16, 2020

@isidorn Are you open for a PR that implements an undocumented getContext command similar to the already existing command setContext?
Is there something where the community can help to make such an API reality?

I'm working on a shortcut visualizer for VS Code keybindings. Being able to evaluate whether the context of a keybinding is active would make the visualizer much more helpful. There are too many keybindings for a single key to output all commands for a key. There are also too many contexts for a manual selection.

image

I imagine this tool to run on my second monitor, displaying all keybindings that are currently active while considering already pressed modifier keys.

@isidorn
Copy link
Contributor

isidorn commented Feb 17, 2020

@hediet this is unrelated to this issue. I believe there is already a feature request for the getContext to be added to the API. You can check open issues, and if there is not you can file a new one. Thanks

@hediet
Copy link
Member

hediet commented Feb 17, 2020

@isidorn as far as I understood, an API for getContext would allow to query whether the Zen Mode is active as @usernamehw suggested. I wanted to add another usecase of why such a getContext API might be reasonable.

#10471 is in discussion since 2016 with no real progress. My own issue regarding a setContext API was flagged as duplicate about a year ago (#77630). I thought this issue could add some momentum to it.

@isidorn
Copy link
Contributor

isidorn commented Feb 17, 2020

Got it. This issue is a small subset of that, and I would tackle it independtly (if we ever decide to do it). Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api feature-request Request for new features or functionality *out-of-scope Posted issue is not in scope of VS Code workbench-zen Full screen 'Zen' view issues
Projects
None yet
Development

No branches or pull requests

6 participants
@jrieken @isidorn @hediet @usernamehw @sketchbuch and others