aboutsummaryrefslogtreecommitdiff
path: root/mpd.lua
diff options
context:
space:
mode:
Diffstat (limited to 'mpd.lua')
-rw-r--r--mpd.lua16
1 files changed, 13 insertions, 3 deletions
diff --git a/mpd.lua b/mpd.lua
index f8c0400..bb193b5 100644
--- a/mpd.lua
+++ b/mpd.lua
@@ -34,12 +34,22 @@ function worker(format)
nowplaying = helpers.escape(np)
-- Don't abuse the wibox, truncate
- if nowplaying:len() > 30 then
- nowplaying = nowplaying:sub(1, 27) .. "..."
- end
+ nowplaying = helpers.truncate(nowplaying, 30)
return {nowplaying}
end
-- }}}
setmetatable(_M, { __call = function(_, ...) return worker(...) end })
+
+
+
+
+
+
+
+
+
+
+
+