Make config compatible with luajit
This commit is contained in:
parent
b848f94c8f
commit
528967e12d
|
@ -181,4 +181,3 @@ client.connect_signal("unfocus", function(c)
|
|||
end)
|
||||
|
||||
client.connect_signal("focus", move_mouse_onto_focused_client)
|
||||
client.connect_signal("swapped", move_mouse_onto_focused_client)
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
local awful = require('awful')
|
||||
local wibox = require('wibox')
|
||||
local gears = require('gears')
|
||||
local utf8 = require("utf8")
|
||||
local pl = require("powerline")
|
||||
local theme = require("theme")
|
||||
|
||||
|
@ -125,7 +124,7 @@ local function list_update(w, buttons, label, _, objects)
|
|||
local text_only = text:match('>(.*)<')
|
||||
local max_length = math.floor((155 - static_length) / count)
|
||||
if (truncate and text_only:len() > max_length) then
|
||||
text = text:gsub('>(.*)<', '>' .. utf8.char(utf8.codepoint(text_only, 1, max_length)) .. '...<')
|
||||
text = text:gsub('>(.*)<', '>' .. string.sub(text_only, 1, max_length) .. '...<')
|
||||
tt:set_text(text)
|
||||
tt:add_to_object(tb)
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue