Modify music player scripts to use spotifyd
This commit is contained in:
parent
0e831ebd9f
commit
82669efb95
@ -1,7 +1,7 @@
|
||||
super + Return
|
||||
$($TERMINAL)
|
||||
super + {_,ctrl,alt +} b
|
||||
{search,firefox,tor-browser}
|
||||
{search,chromium,tor-browser}
|
||||
super + {_,shift +} d
|
||||
rofi -show {run,drun}
|
||||
super + shift + s
|
||||
@ -54,15 +54,15 @@ XF86Audio{Raise,Lower}Volume
|
||||
amixer sset Master 5%{+,-} && refbar
|
||||
# songs control
|
||||
XF86Audio{Next,Prev}
|
||||
mpc {next,prev} && refbar
|
||||
playerctl {next,previous} && refbar
|
||||
ctrl + XF86Audio{Next,Prev}
|
||||
mpc seek {+,-}4
|
||||
# pause/play
|
||||
{XF86AudioPlay,super + slash}
|
||||
mpc toggle && refbar
|
||||
playerctl play-pause && refbar
|
||||
# stop
|
||||
XF86AudioStop
|
||||
mpc stop && refbar
|
||||
playerctl stop && refbar
|
||||
|
||||
ctrl + alt + {Left,Up,Down,Right}
|
||||
rotscreen {left,normal,inverted,right}
|
||||
|
@ -1,11 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo ""
|
||||
if mpc status | grep -q "playing"; then
|
||||
mpc | sed "/^volume:/d;s/\\&/&/g;s/\\[playing\\].*//g"
|
||||
elif mpc status | grep -q "paused"; then
|
||||
if playerctl metadata --format={{playerName}} | grep -q "spotifyd"; then
|
||||
echo ""
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# if mpc status | grep -q "playing"; then
|
||||
# mpc | sed "/^volume:/d;s/\\&/&/g;s/\\[playing\\].*//g"
|
||||
# elif mpc status | grep -q "paused"; then
|
||||
# echo ""
|
||||
# else
|
||||
# echo ""
|
||||
# fi
|
||||
|
||||
if playerctl --player=spotifyd status | grep -q "Playing"; then
|
||||
playerctl metadata --format "{{ artist }} - {{ title }}"
|
||||
elif playerctl --player=spotifyd status | grep -q "Paused"; then
|
||||
echo ""
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user