Coder Social home page Coder Social logo

xyzianz / plasmium Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 1.0 36 KB

A Qt-based integration between chrome/chromium and plasma desktop and rofi

C++ 78.38% QMake 1.25% JavaScript 16.94% CMake 2.80% C 0.63%
kde kde-plasma-5 kde-desktop plasma plasma5 rofi chrome-extension chrome chrome-browser krunner

plasmium's Introduction

plasmium

A Qt-based integration between chrome/chromium and the plasma desktop (as well as rofi)

State

This is a work-in-progress. It is constantly being rewritten on a day-by-day basis.

Browser support

  • Chrome and Chromium
  • Theoretically, any browser which implements WebExtensions with Chrome-compatible API:s. Opera and Firefox may work, but it is not tested nor maintained.

Dependencies

  • Qt (5.5)
  • CMake (build dependency)
  • qmake (build dependency)

Build

First, cd into and build /plasmium with qmake . ; make && sudo make install

Then (if you want plasma krunner integration) cd into and build /plasmiumrunner with cmake . ; make ; make install

Then (if you want rofi integration) cd into and build /plasmiumrofimodi with qmake . ; make && sudo make install

Then finally:

  • install /plasmiumextension/org.kde.plasmium.json into either /etc/chromium/native-messaging-hosts or /etc/opt/chrome/native-messaging-hosts depending on your browser.
  • open chrome://extensions, tick the Developer mode checkbox, press Load unpacked extension... and browse to the location of plasmiumextension and load.

Rofi usage

Start rofi with the following parameters:

-show chrome -modi run,chrome:/usr/bin/plasmiumrofimodi,ssh

Or if you want to combine several modis into one entry (please note, this disables opening urls not specifically in the chrome.topsites):

-show combi -modi combi -combi-modi chrome:/usr/bin/plasmiumrofimodi,run,window,ssh

What is working now

  • There is a dbus interface with working implementations to:
  • mute all tabs
  • mute all background tabs
  • unmute all tabs
  • unmute the current tab
  • Get a list of top sites from the browser
  • Get a list of open tabs and windows
  • Open a new tab with a specified URI
  • Switch to a specific tab and bring its window to the front
  • Get a list of all windows currently playing audio
  • There is a rofi modi (a plugin for rofi, you will need to add it to your rofi setup/config yourself) which can open a new tab in your browser using a supplied uri, with rofi completion from the list of top sites, as well as switch active tab in the browser
  • There is a non-working krunner plugin which will be able to switch between tabs in the browser

Contribute

Yes, please! That's a very good idea!

Todo

  • Collect underpants
  • Set up keybindings for plasma, gnome and xbindkeys
  • Package chrome extension
  • Use actual debugging instead of writing to a file
  • Export bookmarks from the browser
  • Export the browser history API
  • Open a new window in the browser
  • a taskbar plasmoid integration, which only paints the plasma 5.9 audio icons on chrome windows which actually plays sound
  • a working krunner plugin to switch between tabs in the browser
  • extend the rofi plugin to also complete based on browser bookmarks, the history API
  • --Build a second rofi plugin which switches tabs in browser, just like the krunner plugin is supposed to do-- (Done!)
  • bind the XInput media keys to playing media objects in the browser, such as youtube, spotify or google play music.
  • ????
  • Profit!

Other possibilities: (not sure if these are worth-while)

  • It is possible to open chrome settings directly via a simple dbus message (newTab: chrome://settings/). Subsections of the chrome settings are also possible to open, such as chrome://settings/passwords. This could be utilized in e.g. a kcm_chrome module for systemsettings or from rofi/krunner.

plasmium's People

Contributors

xyzianz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

qtlab

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.