obsidian-tiling-wm
SNIPPET
ToYoNiX

obsidian-tiling-wm

css snippet to make obsidian fit in a tiling wm env with no top bar or anything that requires a mouse.

Obsidian Tiling WM

A CSS snippet that strips Obsidian's window chrome, for people running a tiling window manager. No plugin.

Obsidian with the snippet enabled

Gone: the titlebar, the close/minimise/maximise buttons, the sidebar collapse arrows, the tab bar, and the per-pane view header. What is left is the note, the sidebars if you want them, and the status bar.

Why

A tiling window manager already owns window geometry. It decides where the window goes, how big it is, and when it closes — so a titlebar with its own close, minimise and maximise buttons is a second set of controls for something you have already delegated. Worse, it costs a strip of vertical space on every window, permanently, to duplicate a job your keybindings do better.

The same argument extends inward. If you are already driving windows from the keyboard, the tab bar and the sidebar chevrons are mouse affordances for things with perfectly good hotkeys.

How it came to be

The usual forum answer to this question points at a plugin. It does not need one — hiding UI is what CSS is for, and Obsidian loads user snippets with no restrictions on what they can target.

The problem with the thread, and with most snippets you will find for this, is age. It is from 2021, and Obsidian's DOM has moved since. Copied selectors either miss silently or hide the wrong thing, and you cannot tell which from reading the CSS.

So none of the class names here were copied. They were read out of the installed application's own stylesheet:

# The asar is a plain archive; the class names are in the clear.
ASAR=~/.config/obsidian/obsidian-*.asar        # flatpak: ~/.var/app/md.obsidian.Obsidian/config/obsidian/
strings -n 6 "$ASAR" | grep -oE '\.(titlebar|workspace-tab-header-container|sidebar-toggle-button|view-header|workspace-ribbon|status-bar)[a-z-]*' | sort | uniq -c | sort -rn

That is worth knowing because it is also how you maintain this. When a future Obsidian version renames something and part of the snippet stops working, re-run that command against the new version and compare, rather than searching the forum again.

Written against Obsidian 1.13.

Install

  1. Download Tiling WM.css.
  2. Drop it in YourVault/.obsidian/snippets/.
  3. Settings → Appearance → CSS snippets → reload → enable Tiling WM.
  4. Settings → Appearance → Window frame style → Hidden.

Step 4 is not optional-but-nice, it is half the effect, and it is a built-in setting rather than a plugin. With Native, your window manager draws the decorations and this snippet only removes Obsidian's inner chrome. With Hidden, nothing draws them.

What you lose, and what replaces it

Everything removed here has a keybinding. That is the premise, not a consolation:

RemovedUse instead
Tab barCtrl+O quick switcher, Ctrl+Tab next tab, Ctrl+W close
Window buttonsYour WM's own bindings
Sidebar chevronsCommand palette → Toggle left/right sidebar
View header navCtrl+P command palette reaches all of it

Bind the two sidebar toggles to real keys in Settings → Hotkeys. They are the one thing that becomes genuinely more awkward, since without the chevrons they are otherwise only reachable through the palette.

Configuring it

If you have the Style Settings plugin, three toggles appear under Tiling WM:

ToggleDefaultEffect
Show the tab baroffBrings the tab strip back
Hide the left ribbonoffRemoves the vertical icon strip
Hide the status baroffRemoves the bottom bar

The toggles add chrome back rather than removing it, which is deliberate. A toggle that removes something leaves the snippet inert when its plugin is missing or disabled — the wrong failure direction for a snippet whose whole job is removal. As written, the defaults hold with no plugin at all, and Style Settings is purely additive.

Without the plugin, edit the file: each section is numbered and independent, so deleting one has no effect on the others.

Modifying it

The snippet is a short list of selectors, one per piece of chrome:

SelectorWhat it is
.titlebarThe whole top strip, including its drag region
.titlebar-button-container, .titlebar-buttonClose, minimise, maximise
.sidebar-toggle-buttonThe sidebar collapse chevrons (.mod-left, .mod-right)
.workspace-tab-header-containerThe tab strip
.view-header, .view-header-nav-buttonsPer-pane header: breadcrumbs, back/forward, pane menu
.workspace-ribbonThe vertical icon strip on the far left
.status-barThe bottom bar

To hide something not listed, find its selector rather than guessing at it. In Obsidian, Ctrl+Shift+I opens devtools; the element picker (Ctrl+Shift+C) then names any part of the UI you click. Add it in the same shape as the rules already there:

body:not(.is-mobile) .whatever-you-found {
  display: none !important;
}

Two conventions in the file worth keeping:

  • body:not(.is-mobile) on every rule, so a synced vault opened on Obsidian mobile is untouched. Mobile has a different layout and no window chrome to remove.
  • !important throughout. Themes set these properties too, and a snippet that loses a specificity battle fails invisibly.

If you want it to apply on Linux only, Obsidian puts .mod-linux, .mod-windows and .mod-macos on body — scope with those.

Known behaviour

  • Removing .titlebar removes the window's drag region. Correct under a tiling WM; if you also use a floating layout sometimes, you will not be able to drag the window by its top edge.
  • With the tab bar hidden there is no visual indication of open tabs. The note's inline title tells you where you are; Ctrl+O gets you anywhere else.
  • Stacked tabs still render their vertical title strip, which is a separate element from the tab bar and is left alone deliberately — it is the only way to navigate a stack.

Licence

MIT — see LICENSE.

Related

How to Install

  1. Download the repository ZIP below
  2. Unzip it and find the CSS snippet file
  3. Move the CSS file into your vault's .obsidian/snippets/ folder
  4. Open Obsidian → Settings → Appearance → CSS Snippets → Enable it

Stats

Stars

0

Forks

0

License

MIT

Last updated 1mo ago

Categories