From 7cb6b0ccbdbd2d589e70a971ecbb138e5021a8a4 Mon Sep 17 00:00:00 2001 From: elenapan Date: Wed, 17 Jul 2024 23:19:45 +0300 Subject: [PATCH] Use os.date instead of running system date binary --- config/awesome/noodle/day_of_the_week.lua | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/config/awesome/noodle/day_of_the_week.lua b/config/awesome/noodle/day_of_the_week.lua index 54ebebb..1f69abc 100644 --- a/config/awesome/noodle/day_of_the_week.lua +++ b/config/awesome/noodle/day_of_the_week.lua @@ -67,19 +67,11 @@ local day_of_the_week = wibox.widget { } local update_dotw = function () - awful.spawn.easy_async_with_shell("date +%u", function (out) - local index = tonumber(out) - for i=1,7 do - dotw_containers[i].bg = "#00000000" - -- dotw_textboxes[i].markup = - -- "" - -- .. dotw_initials[i] .. "" - end - dotw_containers[index].bg = dotw_colors[index] - -- dotw_textboxes[index].markup = - -- "" - -- .. dotw_initials[index] .. "" - end) + local index = tonumber(os.date("%u")) + for i=1,7 do + dotw_containers[i].bg = "#00000000" + end + dotw_containers[index].bg = dotw_colors[index] end -- Initialize