2019-06-09 16:44:33 +00:00
|
|
|
#!/usr/bin/env bash
|
2019-12-11 05:52:23 +00:00
|
|
|
# -*- sh -*-
|
2019-06-03 04:41:43 +00:00
|
|
|
|
|
|
|
STATUS="$(playerctl status)"
|
|
|
|
MSG="$(playerctl metadata --format '{{xesam:title}} - {{xesam:artist}}')"
|
|
|
|
OPTIONS="玲 Back
|
|
|
|
怜 Next
|
|
|
|
懶 Play/Pause
|
|
|
|
Stop"
|
|
|
|
|
|
|
|
SELECTED="$(
|
2019-06-10 04:14:30 +00:00
|
|
|
rofi -dmenu \
|
|
|
|
-theme applet \
|
|
|
|
-mesg "${MSG:-"No infomation"}" \
|
|
|
|
-p "${STATUS:-"Not Playing"}" \
|
|
|
|
-i \
|
|
|
|
-line-padding 4 <<< $OPTIONS
|
2019-06-03 04:41:43 +00:00
|
|
|
)"
|
|
|
|
|
|
|
|
echo $SELECTED
|
|
|
|
|
|
|
|
case $SELECTED in
|
|
|
|
*Next)
|
|
|
|
playerctl next ;;
|
|
|
|
*Back)
|
|
|
|
playerctl previous ;;
|
|
|
|
*Play/Pause)
|
|
|
|
playerctl play-pause ;;
|
|
|
|
*Stop)
|
|
|
|
playerctl stop ;;
|
|
|
|
*)
|
|
|
|
echo $SELCTED ;;
|
|
|
|
esac
|
|
|
|
|