From 87a81fe8b9dee89e66dc38e0199e53c58beb147d Mon Sep 17 00:00:00 2001 From: cortex3 <10298122+cortex3@users.noreply.github.com> Date: Tue, 19 Oct 2021 15:49:13 +0200 Subject: [PATCH] fixes missing uptime from #155 awful.widget.watch only invokes a command and not an entire shell. The pipe here doesn't work so I moved the removal of the "up " string into the existing regex below. (btw I love your awesome dotfiles, thank you for your work!) --- config/awesome/elemental/dashboard/amarena.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/awesome/elemental/dashboard/amarena.lua b/config/awesome/elemental/dashboard/amarena.lua index ff761c7..f7cbeb8 100644 --- a/config/awesome/elemental/dashboard/amarena.lua +++ b/config/awesome/elemental/dashboard/amarena.lua @@ -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 {