Add an api for extensions to detect/observe Zen mode
It would be nice for extensions to be able to adapt when Zen mode is active.
Refs: https://github.com/eamodio/vscode-gitlens/issues/1338
@eamodio this makes good sense! Let's see if there are more extensions that would benefit from this and if yes we could look into adding this.
@isidorn This would be really useful for extensions that create distractions when screen recording.
I'm developing a plug-in for reading novels. It can enter full screen to get a better reading experience, but the header in zen mode still takes up a little space. Now I want to use it, such as displaying the time and title, but I have no way of knowing whether the user is currently in zen mode, the user can either through the plugin api, or through a keyboard shortcut, so I also need a way to detect zen mode
I'm working on an interactive coding tutorial that runs inside Visual Studio Code. It would be great to be able to read the zen mode status. Also, it could be useful to define (or propose to the user) a default width for editor, because reading long lines of markdown text isn't really easy on the eyes.
22.01.2021: not able to tell if zenMode is active 07.03.2025: also not able to tell if zenMode is active
I wanted to modify an extension to also switch the primary sidebar to be visible when toggling zen mode from off to on. But not be able to tell if it is active it would also switch the primary bar when the zen mode gets toggled from on to off.
Sidenote: why can't i set an option for the sidebars in zen mode?
edit: For now i defined a global variable which i toggle when clicking the icon of this extension: https://marketplace.visualstudio.com/items?itemName=fudd.toggle-zen-mode To be able to tell if zen mode is on or off. But this needs to only toggle it with the icon and that "restore zen Mode" config is false.
This issue would probably be solved with: #180056
I'm using an extension to show me Battery and Time in the statusbar, since I can't see it when in Zen Mode. But that is not nessesarry if not in Zen Mode.
So I would like add an Option to the extension that the battery and Clock is not shown when not in Zen Mode.