Filtering and switching between Obsidian tabs from Rofi

I made a ~30 line plugin (GitHub - digitalsignalperson/obsidian-rofi-helper: This plugin adds a leaf id parameter to the URI protocol for switching between open Obsidian tabs with Rofi. A sample Rofi script is included.)

to allow for focusing to leaf id’s read out of the workspace.json file with the URI

obsidian://switch?vault=myvault&id=43ee39f0a20b097a

So I can use an obsidian-rofi.py Rofi script

E.g. rofi -modi "obsidian:./obsidian-rofi.py" -show obsidian

More usage options:

# Just switch Obsidian tabs
rofi -modi "obsidian:./obsidian-rofi.py" -show obsidian

# Show all desktop windows as well as Obsidian tabs in the same list of options
rofi -modes combi -show combi -show-icons -combi-modes "window,obsidian:./obsidian-rofi.py"

# Show desktop windows and tabs in different pages (switch with Ctrl+Tab)
rofi -modes "window,obsidian" -show window -show-icons -modi "window,obsidian:./obsidian-rofi.py"

Reference:

I’ve only tested this on linux.

I’m using this one bound to Super+Tab to have as a detailed Alt+Tab task switcher, which initially shows all the desktop windows, then if I Ctrl+Tab it will show the Obsidian tabs per the above screenshot.

rofi -modes "window,obsidian" -show window -show-icons -window-format "{c} {t}" -theme -hover-select -modi "window,obsidian:./obsidian-rofi.py"

I’m also using a modified version of Rofi that does some KWin window highlighting (Linux /w KDE Plasma desktop) GitHub - digitalsignalperson/rofi-kwin-highlight: Rofi: A window switcher, application launcher and dmenu replacement

1 Like

this is amazing im going to try itr out now thanks

1 Like