Add CPU Frequency indicator

This commit is contained in:
Thomas Avé 2022-07-21 14:00:26 +02:00
parent 207f847a1c
commit 3766d6ac01
2 changed files with 5 additions and 2 deletions

View File

@ -15,7 +15,7 @@ font:
family: Source Code Pro
style: Bold Italic
size: 16
size: 14
# Colors (Molokai Dark)
colors:

View File

@ -64,6 +64,7 @@ top_panel.create = function(s)
{
layout = wibox.layout.fixed.horizontal,
wibox.layout.margin(wibox.widget.systray(), dpi(5), dpi(5), dpi(5), dpi(5)),
wibox.widget.textbox(' | '),
updates_indicator,
wibox.widget.textbox(' | '),
lain.widget.mem({
@ -74,10 +75,12 @@ top_panel.create = function(s)
wibox.widget.textbox(' | '),
lain.widget.cpu({
settings = function()
widget:set_markup(lain.util.markup.font(theme.font, " " .. cpu_now.usage .. "% "))
widget:set_markup(lain.util.markup.font(theme.font, " CPU: " .. cpu_now.usage .. "% "))
end,
}),
wibox.widget.textbox(' | '),
awful.widget.watch('bash -c "/usr/bin/cat /proc/cpuinfo | grep MHz | cut -b 12- | sort -r | head -n 1 | xargs printf \'%f / 1000\n\' | bc -l | cut -b -4"', 1),
wibox.widget.textbox('GHz | '),
awful.widget.watch('bash -c "sensors | grep Tctl | cut -f 10 -d \' \' | cut -c 2-"', 5),
wibox.widget.textbox(' | '),
wibox.layout.margin(require("widgets.layout-box"), dpi(5), dpi(5), dpi(5), dpi(5)),