aboutsummaryrefslogtreecommitdiffstats
path: root/herbstluftwm
diff options
context:
space:
mode:
Diffstat (limited to 'herbstluftwm')
-rw-r--r--herbstluftwm/.config/herbstluftwm/dependencylist1
-rwxr-xr-xherbstluftwm/.config/herbstluftwm/panel_indicators.sh16
2 files changed, 15 insertions, 2 deletions
diff --git a/herbstluftwm/.config/herbstluftwm/dependencylist b/herbstluftwm/.config/herbstluftwm/dependencylist
index 84c61d7..25684e6 100644
--- a/herbstluftwm/.config/herbstluftwm/dependencylist
+++ b/herbstluftwm/.config/herbstluftwm/dependencylist
@@ -5,6 +5,7 @@ dmenu2
5feh 5feh
6i3lock 6i3lock
7lemonbar-xft-git 7lemonbar-xft-git
8mpc
8playerctl 9playerctl
9pulseaudio 10pulseaudio
10pulseaudio-alsa 11pulseaudio-alsa
diff --git a/herbstluftwm/.config/herbstluftwm/panel_indicators.sh b/herbstluftwm/.config/herbstluftwm/panel_indicators.sh
index 0ad6996..8388c83 100755
--- a/herbstluftwm/.config/herbstluftwm/panel_indicators.sh
+++ b/herbstluftwm/.config/herbstluftwm/panel_indicators.sh
@@ -10,12 +10,24 @@ volume_icon=("\uf026" "\uf027" "\uf028")
10music() 10music()
11{ 11{
12 # Music 12 # Music
13 player_status=$(playerctl status) 13 mpd_status=$(mpc | sed -nr "s/^\[(.*)\].*$/\1/p")
14 if [ $player_status = "Playing" ]; then 14 if [ $mpd_status = "playing" ]; then
15 player_title=$(mpc -f "%title%" current)
16 player_artist=$(mpc -f "%artist%" current)
17 if [ -n "$player_artist" ]; then
18 playing="$player_title - $player_artist"
19 else
20 playing="$player_title"
21 fi
22 elif [ $(playerctl status) = "Playing" ]; then
15 player_artist=$(playerctl metadata artist) 23 player_artist=$(playerctl metadata artist)
16 player_title=$(playerctl metadata title) 24 player_title=$(playerctl metadata title)
17 playing="$player_title - $player_artist" 25 playing="$player_title - $player_artist"
26 else
27 playing=""
28 fi
18 29
30 if [ -n "$playing" ]; then
19 if [ "$current" != "$playing" ] ; then 31 if [ "$current" != "$playing" ] ; then
20 current=$playing 32 current=$playing
21 scrolling=$current 33 scrolling=$current