From fea2bd24e83c90c311f4e77ccf46f1464a6f5afb Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Sun, 3 Nov 2024 16:09:10 -0600 Subject: update temp widget to be fancier and other small stuff --- bar.lua | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'bar.lua') diff --git a/bar.lua b/bar.lua index c611afc..ab6cda8 100644 --- a/bar.lua +++ b/bar.lua @@ -17,6 +17,7 @@ local spacing = 8 local separator = { widget = wibox.widget.separator, opacity = 0 } local widgets = { + temperature_file = nil; spacing = spacing, -- constant layoutlist = wibox.widget { layout = wibox.layout.fixed.horizontal, @@ -47,15 +48,14 @@ local widgets = { }, separator, } end, - textclock = wibox.widget.textclock("%A, %B %e, %-I:%M %p"), - cpu = wibox.widget { + textclock = wibox.widget.textclock("%A, %B %-e, %-I:%M %p"), + cpu = { layout = wibox.layout.fixed.horizontal, wibox.widget.textbox "CPU: ", widget_cpu_usage, wibox.widget.textbox "% ", - widget_temperature "/sys/class/hwmon/hwmon2/temp1_input", -- FIXME - wibox.widget.textbox "°", }, + temp = widget_temperature(), ram = { layout = wibox.layout.fixed.horizontal, wibox.widget.textbox "RAM: ", @@ -101,7 +101,11 @@ function widgets.right_widgets(s) return wibox.widget { { layout = wibox.layout.fixed.horizontal, spacing = spacing, - widgets.cpu, + { + layout = wibox.layout.fixed.horizontal, + widgets.cpu, + widgets.temp, + }, widgets.ram, widgets.vol, widgets.bat, -- cgit v1.2.3