aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/wms5
1 files changed, 2 insertions, 3 deletions
diff --git a/bin/wms b/bin/wms
index d541438..03b5b05 100755
--- a/bin/wms
+++ b/bin/wms
@@ -79,7 +79,7 @@ copy_and_notify() {
}
format_player_name() {
- if echo "$1" | grep -Eq ^firefox\.instance.*; then
+ if echo "$1" | grep -Eq '^firefox\.instance.*'; then
echo 'firefox'
else
echo "$PLAYER"
@@ -88,8 +88,7 @@ format_player_name() {
format_player_title() {
TITLE="$(playerctl --player="$PLAYER" metadata xesam:title)"
- LEN="$(echo "$TITLE" | wc -c)"
- if [ "$LEN" -gt 82 ]; then
+ if [ "${#TITLE}" -gt 82 ]; then
printf '%s...\n' "$(echo "$TITLE" | head -c 80)"
else
echo "$TITLE"