summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/extra/usbtoggle2
-rwxr-xr-xbin/guiscripts/slmpd5
2 files changed, 4 insertions, 3 deletions
diff --git a/bin/extra/usbtoggle b/bin/extra/usbtoggle
index 7adb2a2..e8d4634 100755
--- a/bin/extra/usbtoggle
+++ b/bin/extra/usbtoggle
@@ -4,7 +4,7 @@
# dependencies
# - lsusb (to list usb devices)
-# - commander (menu command)
+# - fzf (menu command)
# - doas (to run as root)
device="$(lsusb | fzf)"
diff --git a/bin/guiscripts/slmpd b/bin/guiscripts/slmpd
index 96d9cd1..a102ba0 100755
--- a/bin/guiscripts/slmpd
+++ b/bin/guiscripts/slmpd
@@ -1,6 +1,7 @@
#!/bin/sh
if mpc > /dev/null 2>&1
then
- test "`mpc status %totaltime%`" = "0:00" ||
- echo -n " $(mpc status "%currenttime%/%totaltime%") $(mpc -f "[[%title%]|%file%]" | head -n -2) "
+ if [ "$(mpc status "%totaltime%")" != "0:00" ]; then
+ printf '%s %s' "$(mpc status "%currenttime%/%totaltime%")" "$(mpc -f "[[%title%]|%file%]" | head -n -2)"
+ fi
fi