Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
aaaaaaaalex committed Dec 30, 2020
1 parent d1751a4 commit 2eae33b
Showing 1 changed file with 31 additions and 8 deletions.
39 changes: 31 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,38 @@
# Ultra-barebones, Linux-only media-controls for VLC, your web browser, etc.
Designed as a zero-redundancy alternative to [the accepted means of binding multimedia keys to i3](https://faq.i3wm.org/question/3747/enabling-multimedia-keys.1.html)
Designed as a zero-redundancy alternative to [the accepted means of binding multimedia keys to i3](https://faq.i3wm.org/question/3747/enabling-multimedia-keys.1.html), but can also be used for general-purpose media control :D

## !!WIP, Currently only plays/pauses all active players!!
# Installation

## Currently must be built from src...
Requires libdbus-1 headers:
### Currently must be built from src, but its easy c:
Requires libdbus-1 headers: `sudo apt update && sudo apt install -y libdbus-1-dev`

`sudo apt install libdbus-1-dev`
then build... `./build.sh`

then...
optionally install with `ln` or `cp` or whatever, e.g. `cp ./mediactl /usr/bin/mediactl`

`./build.sh`
# Usage
`mediactl` to list all mediaplayers found over D-Bus

## Currently a WIP, please contribute any missing MPRIS methods you need, or any other relevant features you can think of :)
`mediactl <MPRIS Method Name>` to call an mpris method

`mediactl` simply propagates MPRIS methods from the commandline over the D-Bus to all active mediaplayers, so hypothetically, any zero-argument MPRIS method will work normally.

e.g, to play: `mediactl Play`

A list of all MPRIS methods can be found [here](https://specifications.freedesktop.org/mpris-spec/2.2/Player_Interface.html), but keep in mind not everything fully implements it!

# Example `mediactl` usage in i3 config
The original purpose of this program was to enable my keyboard's multimedia keys after installing i3.
My i3 config now has the following lines enabling this behaviour:

```
# bind keyboard media keys to mpris methods
bindsym XF86AudioPlay exec mediactl PlayPause
bindsym XF86AudioNext exec mediactl Next
bindsym XF86AudioPrev exec mediactl Previous
bindsym XF86AudioStop exec mediactl Stop
```


# Disclaimer
This is a WIP and is provided with no guarantees or safety nets, please contribute with PRs and logged issues :)

0 comments on commit 2eae33b

Please sign in to comment.