rofi
jq
chrome-remote-interface
xdotool
chrome
/chromium
configured to run a remote debugger on port 9222. (see: Arch wiki for persistence)--remote-debugging-port=9222
- Clone repository
- Alter your
rofi
config by addingtabs:<PATH_TO_REPO>/chromium-rofi-mode.sh
to themodi
entry or use that string when callingrofi
This idea isn't mine alone, a few others have had similar:
- https://github.com/kevinmorio/rofi-switch-browser-tabs
- davatorium/rofi#214
- (I'm sure there are more, this is merely what I encountered)
While I believe that other solutions work fine here, I like this variant made here for a few key reasons:
- Passing the tab ID allows for a more conflict-free and stable tab-selection
- Activating the window afterwards with
xdotool
is a subtle but super useful touch for me
Some sites have displayed titles that do not match what is shown in the debugging interface. For example, YouTube and Google Drive are key offenders here. I'm not sure exactly what mechanism is causing this. When this happens, the tab can still be activated, but the window switching might not work as xdotool
might not be able to match the window title name.
Sometimes (primarily when a window is restored via Ctrl-Shift-t after startup), a tab can exist but not yet be loaded. Despite it showing up in the tab bar on chrome, until it is viewed and loaded, it will not show up here.