Skip to content

Commit

Permalink
added package.json to version control
Browse files Browse the repository at this point in the history
 - update readme with install instructions
  • Loading branch information
lt-mayonesa committed Apr 20, 2019
1 parent 6575e0b commit 4423ee4
Show file tree
Hide file tree
Showing 4 changed files with 11,515 additions and 19 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ tags
.idea
out
node_modules
package.json
package-lock.json
docs
coverage
karma_html
dist/**/*
venv
43 changes: 26 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,40 @@ Pull requests are welcome.
### How it looks (linux mint)
![players screenshot](https://raw.githubusercontent.com/Lt-Mayonesa/browser-mpris2/master/screenshot.png)

## Installation
Go to the [latest release](https://github.com/Lt-Mayonesa/browser-mpris2/releases/latest) and download both `.crx` and `.deb` artifacts.

## Installation (for Chrome)
Clone this repo:
```text
git clone https://github.com/Lt-Mayonesa/browser-mpris2
```
Then, in Chrome, go to `Tools > Extensions` (or `chrome://extensions`), enable `Developer mode` and `Load unpacked extension...` with the root of this repo.
Install the `.deb` file. This will make `chrome-mpris2` from the command line available.

Once the extension loaded copy the extension ID (ie: `pbipjpimbmchphdddpkimpegkgnbepdj`).
### for Chrome
Then, in Chrome, go to `Tools > Extensions` (or [chrome://extensions](chrome://extensions)) and enable `Developer mode`.

Next, place [chrome-mpris2](src/native/chrome-mpris2) somewhere in your `$PATH`.
Grab the `.crx` file you downloaded and drop it on the Extensions page (if "Drop to install" doesn't show up try reloading the page).

ie: (from the root of the repo)
```text
ln -s $PWD/native/chrome-mpris2 ~/bin/chrome-mpris2
```
Once the extension loaded copy the extension ID (it should be: `mcakdldkgmlakhcpdmecedogacbagdba`).

And run [install-chrome.py](src/native/install-chrome.py) giving it the extension ID and optionally the path (not just the directory) of your just-installed chrome-mpris2 if you installed elsewhere. This will check that you have all the dependencies and tell Chrome about chrome-mpris2 (so that the plugin can use it).
```text
./install-chrome.py EXTENSION_ID [PATH]
Next, open a terminal and run `chrome-mpris2 --init-chrome [EXTENSION_ID]`. ie:
```bash
chrome-mpris2 --init-chrome mcakdldkgmlakhcpdmecedogacbagdba
```
Profit

Reload the extension from the Extensions page.
### for Firefox
> **Signed .xpi coming soon**.
> You'll need to repeat this steps every time you start firefox until .xpi
Profit
Download `.zip` file from [latest release](https://github.com/Lt-Mayonesa/browser-mpris2/releases/latest) and extract.

Open Firefox and go to [about:debugging#addons](about:debugging#addons).

Click on "Load temporary Add-on" button and select the `manifest.json` from the `extension/` dir of the extracted file.

Next, open a terminal and run `chrome-mpris2 --init-firefox [EXTENSION_ID]`. ie:
```bash
chrome-mpris2 --init-firefox 0974c166a46e1eeabfa31321730f621ab0362f05@temporary-addon
```

Reload the extension and profit.

## Powers
If on GNOME or similar you should be able to take advantage of your new powers immediately. Otherwise, you can use something like [playerctl](https://github.com/acrisci/playerctl), perhaps bind it to a key or `XF86AudioPlay` and the like if your keyboard has them.
Expand Down
Loading

0 comments on commit 4423ee4

Please sign in to comment.