summaryrefslogtreecommitdiff
path: root/bar.lua
diff options
context:
space:
mode:
Diffstat (limited to 'bar.lua')
-rw-r--r--bar.lua14
1 files changed, 9 insertions, 5 deletions
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,