From 3766d6ac01ac20fdcbf999a87d6ed3355addde1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= Date: Thu, 21 Jul 2022 14:00:26 +0200 Subject: [PATCH] Add CPU Frequency indicator --- .alacritty.yml | 2 +- awesome/components/pastel/top-panel.lua | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.alacritty.yml b/.alacritty.yml index 264fc8e..c3e66d0 100644 --- a/.alacritty.yml +++ b/.alacritty.yml @@ -15,7 +15,7 @@ font: family: Source Code Pro style: Bold Italic - size: 16 + size: 14 # Colors (Molokai Dark) colors: diff --git a/awesome/components/pastel/top-panel.lua b/awesome/components/pastel/top-panel.lua index 0bec7f2..72b58e2 100644 --- a/awesome/components/pastel/top-panel.lua +++ b/awesome/components/pastel/top-panel.lua @@ -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)),