power menu, redshift, polybar
This commit is contained in:
16
.config/polybar/scripts/player-moc/README.md
Normal file
16
.config/polybar/scripts/player-moc/README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Script: player-moc
|
||||
|
||||
A small script that shows the current song. You can also control mocp.
|
||||
|
||||
|
||||
## Module
|
||||
|
||||
```ini
|
||||
[module/player-moc]
|
||||
type = custom/script
|
||||
exec = ~/polybar-scripts/player-moc.sh
|
||||
interval = 3
|
||||
click-left = mocp -f &
|
||||
click-right = mocp -r &
|
||||
click-middle = mocp -G &
|
||||
```
|
||||
13
.config/polybar/scripts/player-moc/player-moc.sh
Normal file
13
.config/polybar/scripts/player-moc/player-moc.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$(mocp -Q %state)" != "STOP" ];then
|
||||
SONG=$(mocp -Q %song)
|
||||
|
||||
if [ -n "$SONG" ]; then
|
||||
echo "$SONG - $(mocp -Q %album)"
|
||||
else
|
||||
basename "$(mocp -Q %file)"
|
||||
fi
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
Reference in New Issue
Block a user