rewrite player player-moc, close #15

This commit is contained in:
x70b1 2018-04-19 06:34:33 +02:00
parent 500a8f7d3b
commit 66f0728d91
3 changed files with 4 additions and 10 deletions

View File

@ -10,7 +10,7 @@ You can also control mocp.
```ini
[module/player-moc]
type = custom/script
exec = ~/polybar-scripts/player-moc.py
exec = ~/polybar-scripts/player-moc.sh
interval = 5
click-left = mocp -f
click-right = mocp -r

View File

@ -1,9 +0,0 @@
#!/usr/bin/python
import subprocess
song = stdoutdata = subprocess.getoutput("mocp -Q %song")
album = stdoutdata = subprocess.getoutput("mocp -Q %album")
artist = stdoutdata = subprocess.getoutput("mocp -Q %artist")
print(song + " by " + artist + " on " + album)

View File

@ -0,0 +1,3 @@
#!/bin/sh
echo "$(mocp -Q %artist) - $(mocp -Q %song) ($(mocp -Q %album))"