Open your Chrome tabs from Ulauncher
We use Chrome Native messaging API that makes possible for 3rd party applications to communicate with the Chrome browser. This API is essential since there is no other way we can get the list of opened tabs and do actions on them. This application consists of 3 parts: * A chrome extension that exposes the list of opened Chrome tabs and Windows and allows us to interact with them. * An host application, implementing the Native Messaging API that makes the bridge between the Chrome Extension and the Ulauncher Extension, by exposing a websocket server for the ulauncher extension to connect. * The ulauncher extenstion itself.
- ulauncher
- Python >= 2.7
- Python packages:
pip install websocket-client
pip install git+https://github.com/Pithikos/python-websocket-server
- Chrome Browser
- Unusued port 10200. (this is the port that the native host application websocket server will listen on)
Open ulauncher preferences window -> extensions -> add extension and paste the following url:
https://github.com/brpaz/ulauncher-chrome-tabs
This application located in "native_messaging" folder is required for native messaging to work. Read this for technical details.
Open net.brunopaz.ulauncher.tabs.extension.json with an editor and change the "path" value to be the absolute path to the "host" executable.
It should be something like: /home/<youruser>/.cache/ulauncher_cache/extensions/ulauncher-chrome-tabs/native_messaging/host
The manifest file must then be placed in "$HOME/.config/google-chrome/NativeMessagingHosts" You can run the following script to do that for you.
cd native_messaging
sh install_host.sh
- Go to "chrome://extensions/" in your Chrome Browser.
- Make sure "Developer mode" is on and click "Load unpacked". Then select the folder "chrome-ext" located in the root folder of the extension and load it.
- Finally restart ulauncher.
- If everything went well you should be able to type "tabs" and see a list of your opened tabs. Clicking on an item, will activate the respective tab window.
- If you see "No tabs found" message it means something went wrong during the setup. Please look at your chrome extension logs.
- Due to the asyncronous nature of the application, tabs will be refreshed every 30s. It seems a reasonable value but it might be reduced if needed.
make link
To see your changes, stop ulauncher and run it from the command line with: ulauncher -v
.
MIT