From 528967e12d23fc6e67baa2be1e92e1ced2f02d98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= Date: Sun, 21 May 2023 01:27:24 +0200 Subject: [PATCH] Make config compatible with luajit --- awesome/rc.lua | 1 - awesome/widgets/task-list.lua | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/awesome/rc.lua b/awesome/rc.lua index 683058c..8c331a6 100644 --- a/awesome/rc.lua +++ b/awesome/rc.lua @@ -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) diff --git a/awesome/widgets/task-list.lua b/awesome/widgets/task-list.lua index 53ba774..7937996 100644 --- a/awesome/widgets/task-list.lua +++ b/awesome/widgets/task-list.lua @@ -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