This commit is contained in:
cortex3 2025-10-05 13:55:40 +02:00 committed by GitHub
commit 6fa7e2f002
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -443,9 +443,9 @@ local icon_size = dpi(40)
-- Uptime
local uptime_text = wibox.widget.textbox()
awful.widget.watch("uptime -p | sed 's/^...//'", 60, function(_, stdout)
-- Remove trailing whitespaces
local out = stdout:gsub('^%s*(.-)%s*$', '%1')
awful.widget.watch("uptime -p", 60, function(_, stdout)
-- Remove trailing whitespaces and the "up" prefix
local out = stdout:gsub('^%s*up%s(.-)%s*$', '%1')
uptime_text.text = out
end)
local uptime = wibox.widget {