dwm-flexipatch/polybar/scripts/get-media-source-icon.sh
Sravan Balaji 60a43475a9 Media Playing Module with Buttons
- Replace clicks and scroll actions with dedicated buttons
  for media playing module
- Add media-playing-change module to display current media
  source and left-click to change
- Add media-playing-prev/next to play previous or next
  track
- Add media-playing-play-pause to display pause button
  when media is playing and play button when media is
  paused
- Update media-playing to use Zscroll to scroll through
  artist and title text when over limit
- Add some extra helper scripts
2022-07-31 17:30:50 -04:00

19 lines
492 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
mediaStatus=$(playerctl --player=playerctld metadata 2>&1)
if [[ "$mediaStatus" == "No player could handle this command" ]]; then
echo "ﱙ"
else
trackid=$(playerctl --player=playerctld metadata --format '{{ mpris:trackid }}')
if grep -q -i "chromium" <<< "$trackid"; then
echo ""
elif grep -q -i "vlc" <<< "$trackid"; then
echo "嗢"
elif grep -q -i "spotify" <<< "$trackid"; then
echo ""
else
echo ""
fi
fi