Browser tab switcher using rofi. Reads browser session data and presents all open tabs in rofi for fuzzy-search selection with favicon icons. Selecting a tab raises the correct browser window and switches to that tab.
Supports Firefox, LibreWolf, Waterfox, Zen, and Floorp.
- Discovers active browser profiles by scanning known session file paths and checking for profile lock files
- Reads
recovery.jsonlz4(mozlz4 format) to extract all open tabs with titles, URLs, favicons, and last-accessed timestamps - Presents tabs in rofi sorted by most-recently-used order, with website favicons as row icons
- On selection, raises the correct browser window via
wmctrland navigates to the target tab viaxdotoolkeyboard shortcuts
- Python 3 with
lz4module (pip install lz4ordnf install python3-lz4) - rofi (v2.0+)
wmctrlxdotool- X11 (Wayland is not supported)
Run directly:
./brofi
List tabs without rofi:
./brofi --list
Options:
-l, --list List tabs to stdout instead of launching rofi
--no-icons Disable favicon icons in rofi
sudo make install
Or copy brofi to somewhere in your $PATH.
Bind brofi to a keyboard shortcut in your window manager. For example, in
Marco (MATE):
gsettings set org.mate.Marco.keybinding-commands command-1 brofi
gsettings set org.mate.Marco.global-keybindings run-command-1 '<Mod4>space'
brofi ships with a dark semi-transparent rofi theme. The theme is loaded automatically from these locations (first match wins):
$XDG_CONFIG_HOME/brofi/brofi.rasi(user override)- Next to the
brofiscript (for running from the source directory) $PREFIX/share/brofi/brofi.rasi(installed bymake install)
To customize, copy the bundled brofi.rasi to ~/.config/brofi/brofi.rasi
and edit it.
| Browser | Native paths | Flatpak paths |
|---|---|---|
| Firefox | ~/.mozilla/firefox/*/, ~/.config/mozilla/firefox/*/ |
~/.var/app/org.mozilla.firefox/ |
| LibreWolf | ~/.librewolf/*/ |
~/.var/app/io.gitlab.librewolf-community/ |
| Waterfox | ~/.waterfox/*/ |
~/.var/app/net.waterfox.waterfox/ |
| Zen | ~/.zen/*/ |
~/.var/app/app.zen_browser.zen/ |
| Floorp | ~/.floorp/*/ |
~/.var/app/one.ablaze.floorp/ |
Only profiles with an active lock file are read, so stale profiles from non-running browsers are ignored.
- Tab data may be up to ~15 seconds stale (controlled by
browser.sessionstore.intervalinabout:config) - X11 only (uses
wmctrlandxdotool) - Cannot activate tabs in browsers that are completely unresponsive
MIT