Files
xmonad/polybar/scripts/get-media-playing.sh
Sravan Balaji f803927440 Replace Xmobar with Polybar
- Remove unneeded imports
- Move global tangle path to individual code blocks
- Add docks hook to avoid polybar when tiling
- Add dwm-style workspace cycling
- Fix keybindings to put ctrl before shift
- Reset window sizes when force re-tiling
- Add ewmhDesktopsEventHook to myEventHook for polybar integration
- Launch polybar instead of xmobar
- No tangle xmobar config and delete it
- Add polybar config from dwm with bunch of tweaks
2021-05-10 23:54:09 -04:00

21 lines
650 B
Bash
Executable File

#!/bin/bash
#!/usr/bin/bash
mediaStatus=$(playerctl --player=playerctld metadata 2>&1)
if [[ "$mediaStatus" == "No player could handle this command" ]]; then
echo " N/A"
else
artist=$(playerctl --player=playerctld metadata --format '{{ artist }}')
title=$(playerctl --player=playerctld metadata --format '{{ title }}')
status=$(playerctl --player=playerctld metadata --format '{{ status }}')
if [[ $status == "Paused" ]]; then
status_icon=" "
elif [[ $status == "Playing" ]]; then
status_icon=" "
fi
echo "$status_icon $artist - $title"
fi