diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-11-26 16:33:45 +0100 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-11-26 16:33:45 +0100 |
commit | 42c8c1657de27ca7b35981c89f6edb8f31fbfe1a (patch) | |
tree | 2130f4da0b432616c13c1a75da97c81039085c1c /bin | |
parent | 3b659f14503defce477efa12c3af2c8796b1d8eb (diff) |
checkpoint
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/extra/usbtoggle | 2 | ||||
-rwxr-xr-x | bin/guiscripts/slmpd | 5 |
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 |