Easily switch and create tabs in Firefox using Rofi.
- Switch Firefox tabs using Rofi
- Create new tabs in Firefox using Rofi
- Firefox 109.0 or higher
- Rofi
- Python 3
- Clone this repository:
git clone https://github.com/snpshtwrx/tabflow
- Copy the native scripts into your PATH, e.g.
cp tabflow/native/tabwriter ~/.local/bin/
cp tabflow/native/tabselect ~/.local/bin/
If you choose a path different to ~/.local/bin
, you need to adjust the path in step 5 to match your chosen path.
3. Make these scripts executable:
chmod u+x ~/.local/bin/tabwriter
chmod u+x ~/.local/bin/tabselect
- Copy the native manifest into the native-messaging-hosts directory:
# If this directory does not exist yet, run:
mkdir ~/.mozilla/native-messaging-hosts/
cp tabflow/native/tabwriter.json ~/.mozilla/native-messaging-hosts/
- Replace
<user>
with your username in the native manifest (look for the"path"
entry in thetabwriter.json
file). - Add a shortcut to the
tabselect
script, e.g. on Hyprland add the following line to yourhyprland.conf
:
bind = $mainMod_SHIFT, B, exec, ~/.local/bin/tabselect
- Install the extension from https://addons.mozilla.org/en-US/firefox/addon/tabflow/ or add a temporary add-on on the about:debugging page (select the
manifest.json
from the extension directory)
Invoke the tabselect
script, e.g. using a shortcut, and start typing the name of your desired tab.
You can search by tab name, URL or ID (though, you probably don't know the ID of a tab).
If there is no matching tab, and you still press enter, a new tab searching for the string will be opened.
- If you encounter any bugs, feedback is greatly appreciated.
- If you want to use another search engine for results which are not in the current tab list, change the line, with the DDG search query, in the
tabselect
file to match your preferred search engine.