mirror of
https://github.com/elenapan/dotfiles.git
synced 2025-12-26 23:34:57 +08:00
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!)
This commit is contained in:
parent
e952184146
commit
87a81fe8b9
1 changed files with 3 additions and 3 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue