diff options
author | Rose <rose@pinkro.se> | 2025-10-10 11:29:10 +0200 |
---|---|---|
committer | Rose <rose@pinkro.se> | 2025-10-10 11:29:10 +0200 |
commit | b7dfa5fdb2330f1e1cd222365055c3d45ad473be (patch) | |
tree | 78e455c8c43c6c00fc4639932ba7315e8c074cd3 /desktop/Local/share/barmodules/qmmp.sh | |
parent | 98424148dfe9ab666ee928df7565e65faa41b61b (diff) | |
download | dotfiles-main.tar.gz dotfiles-main.tar.bz2 |
Diffstat (limited to 'desktop/Local/share/barmodules/qmmp.sh')
-rwxr-xr-x | desktop/Local/share/barmodules/qmmp.sh | 13 |
1 files changed, 13 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..a0ec01e --- /dev/null +++ b/desktop/Local/share/barmodules/qmmp.sh @@ -0,0 +1,13 @@ +#!/bin/sh +pidof qmmp 2> /dev/null > /dev/null +if [ $? -eq 0 ]; then + 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)" +else + echo -n "qmmp: Exited" +fi |