summaryrefslogtreecommitdiff
path: root/desktop/.local/share/barmodules/qmmp.sh
diff options
context:
space:
mode:
authorRose <rose@pinkro.se>2025-09-15 13:19:37 +0200
committerRose <rose@pinkro.se>2025-09-15 13:22:47 +0200
commit0dfddcc62d215d92192d7abe24a6a254223e7910 (patch)
tree1aba8f35becf77d1597b796560b4171cca7e6d51 /desktop/.local/share/barmodules/qmmp.sh
parent6176f1886c398be739a45016347fba10d7d99bd3 (diff)
downloaddotfiles-0dfddcc62d215d92192d7abe24a6a254223e7910.tar.gz
dotfiles-0dfddcc62d215d92192d7abe24a6a254223e7910.tar.bz2
desktop: make bar modular
Diffstat (limited to 'desktop/.local/share/barmodules/qmmp.sh')
-rwxr-xr-xdesktop/.local/share/barmodules/qmmp.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/desktop/.local/share/barmodules/qmmp.sh b/desktop/.local/share/barmodules/qmmp.sh
new file mode 100755
index 0000000..bb7f849
--- /dev/null
+++ b/desktop/.local/share/barmodules/qmmp.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+pidof qmmp 2> /dev/null > /dev/null
+if [ $? -eq 0 ]; then
+ echo -n " | "
+ nowplaying=$(qmmp --nowplaying '%p - %a: %t')
+ if [ ${#nowplaying} -gt 80 ]; then
+ echo -n "${nowplaying:0:77}... "
+ else
+ echo -n "$nowplaying"
+ fi
+ echo -n "$(qmmp --status | head -1)"
+fi