smikula / obsidian-limelight

Spotlight your active pane
MIT License
31 stars 0 forks source link

Fine grain control of Limelight #10

Open menagerie198 opened 2 years ago

menagerie198 commented 2 years ago

I have reference documents lodged in my sidebars, that are open all the time (aide memoire-type stuff), and Limelight dims them. Is there any way to perhaps have a cssclass that tells Limelight to ignore those specific files? or have Limelight disabled in 'Preview mode'?

smikula commented 2 years ago

@menagerie198 Those are both good suggestions. I personally like that Limelight works in preview mode, but that would be a good thing to add a setting for.

With regards to a CSS class, would it be sufficient if panes with the limelight-ignore class are ignored? It would be up to you to figure out how to get the CSS class on there....not exactly a user friendly solution. Long term it would be nice to have some UI (like in the context menu) to tell it to ignore the spotlight effect.

I'll see when I can carve out time for some of these improvements.

menagerie198 commented 2 years ago

Those sound like two good solutions. I agree that Limelight in Preview is useful, so a toggle would suit me, and hopefully others. limelight-ignore would be good. Could that be part of Limelight? I am thinking that the 'Force note view mode' plugin might offer a way to get this ( i know nothing of these matters, so just putting it out there prospectively - https://github.com/bwydoogh/obsidian-force-view-mode-of-note). Many thanks

tadashi-aikawa commented 2 years ago

Hi.

or have Limelight disabled in 'Preview mode'?

As a quick workaround, I set my CSS as follows.

/************************
/* limelight
************************/
.workspace-leaf:not(.mod-active) .workspace-leaf-content[data-mode="preview"] {
  opacity: 1 !important;
}

However, it would be great if we could enable it in settings. 😄

menagerie198 commented 2 years ago

Thankyou. We can turn it off/on with MySnippets plugin. Integrated into Limelight would be favourite, but this is nice.