rewrite player player-moc, close #15
This commit is contained in:
parent
500a8f7d3b
commit
66f0728d91
@ -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
|
||||
|
@ -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)
|
3
polybar-scripts/player-moc/player-moc.sh
Normal file
3
polybar-scripts/player-moc/player-moc.sh
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "$(mocp -Q %artist) - $(mocp -Q %song) ($(mocp -Q %album))"
|
Loading…
x
Reference in New Issue
Block a user