-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
(Feature request) Bring back Zen Mode #2572
Comments
I agree, it is not much, but it is not quite "zen like". Ideally I would like to get as close to a blank screen as possible. All icons and tabs hidden, just a blank screen and a blinking cursor. I don't think something like that is possible through CSS modification only? |
Almost. You can hide the elements on the page with CSS selectors, but you also need a way to trigger between zen and non-zen mode. You could add a button/shortcut like this: api.addButtonToToolbar({
title: 'Zen mode',
icon: 'book',
action: function() {
$("body").toggleClass("zen-mode");
},
shortcut: 'alt+t'
}); The hiding CSS selectors will be then prepended with |
Zadam's way above works excellent! I've added Zen Mode to my Midnight Trilium Theme: Heres the relevant CSS I used. For a basic Zen Mode that still keeps some note UI like tabs, attributes, and splitter: /* Zen Mode */
body.zen-mode #launcher-pane, body.zen-mode #left-pane, body.zen-mode .title-bar-buttons {
display:none !important;
} For an extreme Zen Mode that hides everything but the note: /* Zen Mode Extreme */
/* display:none friendly */
body.zen-mode #launcher-pane, body.zen-mode #left-pane {
display:none !important;
height:0 !important;
width:0 !important:
}
/* display:none not friendly - some of these have an interactivity lag when coming back from display:none so another method must be used */
body.zen-mode .title-bar-buttons, body.zen-mode .tab-row-widget, body.zen-mode .title-row, body.zen-mode .ribbon-container, body.zen-mode .gutter, body.zen-mode #rest-pane > div:nth-child(1) {
visibility: hidden !important;
height:0 !important;
width:0 !important:
} To me Trilium's awesome style and script flexibility means this can be recreated and perhaps this issue closed? |
This works great! Only thing I would add if making this a feature again is having ESC also exit Zen Mode. Not sure if that is possible with this implementation or not. |
For those wanting to use the feature discussed here, you just need to create two notes as follows:
Reload and there will be a book icon button bottom left. Note that there's no obvious way to exit the extreme Zen mode, but Ctrl-R (browser re-load) works. |
Trilium has entered maintenance mode. Future enhancements will be addressed in TrilumNext: TriliumNext/Notes#141 |
Describe feature
I personally found Zen Mode to be a great way to focus in on the notes.
Is there any way to bring it back?
Additional Information
No response
The text was updated successfully, but these errors were encountered: