Skip to content

biggerfisch/chromium-rofi-mode

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

Chromium rofi tab-switching mode

Requirements:

  1. rofi
  2. jq
  3. chrome-remote-interface
  4. xdotool
  5. chrome/chromium configured to run a remote debugger on port 9222. (see: Arch wiki for persistence) --remote-debugging-port=9222

Instructions

  1. Clone repository
  2. Alter your rofi config by adding tabs:<PATH_TO_REPO>/chromium-rofi-mode.sh to the modi entry or use that string when calling rofi

Notes:

This idea isn't mine alone, a few others have had similar:

While I believe that other solutions work fine here, I like this variant made here for a few key reasons:

  1. Passing the tab ID allows for a more conflict-free and stable tab-selection
  2. Activating the window afterwards with xdotool is a subtle but super useful touch for me

Known issues:

Mismatching titles

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.

Unloaded tabs

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.

About

A script to enable rofi selection of your Chromium-based browser tabs

Topics

Resources

License

Stars

Watchers

Forks

Languages