-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d1751a4
commit 2eae33b
Showing
1 changed file
with
31 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 :) |