Skip to content

Commit

Permalink
cleaned up readme a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
abenz1267 committed Feb 10, 2023
1 parent e3fa3ff commit 41b9f7f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
# PWW = Playerctl Waybar Wrapper

This is a simple program that emits a json with artist or title info you can use in waybar. Additionally you can let it auto-pause media players you provide, f.e. starting a video in your browser will pause spotify.
This is a simple program that emits a json with metadata info you can use in f.e. [Waybar](https://github.com/Alexays/Waybar). Additionally you can let it auto-pause media players you provide, f.e. starting a video in your browser will pause spotify.

## Install

`go install github.com/abenz1267/pww@latest`

## Usage

`pww -a firefox,spotify` will auto-pause/resume watching both Firefox and Spotify.
`pww -w spotify:title` will emit a json with the current spotify title and the Spotify status as a class. so `{"class": "Playing", "text": "Some Title"}`
| command | description | example |
| --------------------------------- | -------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| `pww -a <players>` | will launch a daemon monitoring given players in order to auto-pause/resume them | `pww -a spotify,firefox` |
| `pww -w <player>:<metadata info>` | will watch for changes and print them to stdout | `pww -w spotify:title` will emit f.e. `{"class": "Playing", "text": "Some Title"}` |
| `pww -t <player>` | will play/pause given player, launch it if it's not running at all | `pww -t spotify` |

Additionally a `-p` flag can be provided to specify a placeholder for empty text. F.e. when the player isn't running.

You can use `-t <player>` to toggle the playing state of the given player. If not present, the player will get launched.

### Waybar Example

This is how you'd use it as a custom module in [Waybar](https://github.com/Alexays/Waybar).
Expand Down

0 comments on commit 41b9f7f

Please sign in to comment.