Skip to content

Commit 832a447

Browse files
committed
add README.md
1 parent 5835ab7 commit 832a447

File tree

8 files changed

+314
-1
lines changed

8 files changed

+314
-1
lines changed

COPYING

Lines changed: 232 additions & 0 deletions
Large diffs are not rendered by default.

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
name = "polybar-mpris-watcher-rs"
33
version = "1.0.0"
44
edition = "2024"
5+
license = "GPL-3.0-or-later"
6+
description = "A good music status display for polybar"
7+
repository = "github.com/elliotcubit/polybar-mpris-watcher-rs"
8+
readme = "README.md"
9+
keywords = ["polybar", "mpris", "music", "module"]
510

611
[dependencies]
712
clap = { version = "4.5.41", features = ["derive"] }

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# polybar-mpris-watcher-rs
2+
3+
A good music status display for polybar.
4+
5+
It uses DBus to display the currently playing media. The text size and scrolling rate are configurable.
6+
7+
It supports extended unicode characters, parsing them by grapheme cluster.
8+
9+
# Demo
10+
11+
![demo](assets/demo.gif)
12+
![demo](assets/demo2.gif)
13+
14+
# Installation
15+
16+
`polybar-mpris-watcher-rs` is available on crates.io, and can be installed via `cargo`:
17+
18+
```
19+
$ cargo install polybar-mpris-watcher-rs
20+
```
21+
22+
You will need to add a polybar module which uses the installed binary. This is where configuration is done.
23+
24+
```
25+
[module/music]
26+
type = custom/script
27+
exec = "polybar-mpris-watcher-rs -u 2000 -b 25"
28+
tail = true
29+
```
30+
31+
Add the module wherever in your polybar, e.g. in the middle:
32+
33+
```
34+
modules-center = music
35+
```
36+
37+
# Font debugging
38+
39+
If you have trouble with some characters not displaying, give the polybar wiki [page on fonts](https://github.com/polybar/polybar/wiki/Fonts) a read.
40+
41+
42+

assets/demo.gif

12.7 KB
Loading

assets/demo2.gif

8.99 KB
Loading

src/main.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
// Copyright 2025 Elaine Cubit
2+
//
3+
// This file is part of polybar-mpris-watcher-rs.
4+
//
5+
// polybar-mpris-watcher-rs is free software: you can redistribute it and/or
6+
// modify it under the terms of the GNU General Public License as published by
7+
// the Free Software Foundation, either version 3 of the License, or (at your
8+
// option) any later version.
9+
//
10+
// polybar-mpris-watcher-rs is distributed in the hope that it will be useful,
11+
// but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12+
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13+
// more details.
14+
//
15+
// You should have received a copy of the GNU General Public License along with
16+
// this program. If not, see <https://www.gnu.org/licenses/>.
17+
118
mod watcher;
219

320
use crate::watcher::Watcher;

src/watcher.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
// Copyright 2025 Elaine Cubit
2+
//
3+
// This file is part of polybar-mpris-watcher-rs.
4+
//
5+
// polybar-mpris-watcher-rs is free software: you can redistribute it and/or
6+
// modify it under the terms of the GNU General Public License as published by
7+
// the Free Software Foundation, either version 3 of the License, or (at your
8+
// option) any later version.
9+
//
10+
// polybar-mpris-watcher-rs is distributed in the hope that it will be useful,
11+
// but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12+
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13+
// more details.
14+
//
15+
// You should have received a copy of the GNU General Public License along with
16+
// this program. If not, see <https://www.gnu.org/licenses/>.
17+
118
use std::{
219
thread,
320
time,

0 commit comments

Comments
 (0)