From 4be245f9fdbbca65c0bbed2bf6130bf0d71e0bac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= Date: Thu, 21 Jul 2022 17:58:30 +0200 Subject: [PATCH] Use icons --- awesome/components/pastel/top-panel.lua | 30 ++++++++++++++++--------- awesome/theme.lua | 2 +- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/awesome/components/pastel/top-panel.lua b/awesome/components/pastel/top-panel.lua index 465c97c..82b23cb 100644 --- a/awesome/components/pastel/top-panel.lua +++ b/awesome/components/pastel/top-panel.lua @@ -35,6 +35,12 @@ end) -- Bar Creation -- =================================================================== +local icons_widget = wibox.widget { + layout = wibox.layout.fixed.horizontal, + wibox.layout.margin(wibox.widget.systray(), dpi(0), dpi(7), dpi(8), dpi(7)), + wibox.layout.margin(volume_widget({widget_type='arc'}), dpi(5), dpi(7), dpi(8), dpi(7)), + -- wibox.layout.margin(battery_widget({font=theme.font, display_notification=true}), dpi(7), dpi(7), dpi(7), dpi(7)), +} local updates_indicator = wibox.widget{ { @@ -43,10 +49,18 @@ local updates_indicator = wibox.widget{ { widget = awful.widget.watch('bash -c "checkupdates | wc -l"', 360), }, - top = 4, bottom = 4, left = 0, right = 0, + top = 0, bottom = 0, left = 0, right = 0, widget = wibox.container.margin }, - wibox.widget.textbox(' Updates'), + { + { + image = "/usr/share/icons/Papirus/48x48/apps/org.kde.archUpdate.svg", + forced_width = 18, + widget = wibox.widget.imagebox, + }, + top = 8, bottom = 0, left = 5, right = 0, + widget = wibox.container.margin + } }, widget = wibox.container.background } @@ -68,16 +82,10 @@ top_panel.create = function(s) wibox.widget.textclock('%a %b %d, %H:%M:%S', 1), { layout = wibox.layout.fixed.horizontal, - wibox.layout.margin(wibox.widget.systray(), dpi(5), dpi(5), dpi(5), dpi(5)), - wibox.widget.textbox(' '), - volume_widget({widget_type='arc'}), - wibox.widget.textbox(' '), - battery_widget({font=theme.font, display_notification=true}), - wibox.widget.textbox(' | '), + icons_widget, + wibox.widget.textbox(' | '), updates_indicator, wibox.widget.textbox(' | '), - awful.widget.watch('bash -c "cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"', 5), - wibox.widget.textbox(' | '), wibox.layout.margin(require("widgets.layout-box"), dpi(5), dpi(5), dpi(5), dpi(5)), wibox.widget.textbox(' | '), lain.widget.mem({ @@ -94,7 +102,7 @@ top_panel.create = function(s) 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 Package | cut -f 5 -d \' \' | cut -c 2-"', 5), + awful.widget.watch('bash -c "sensors | grep Tctl | cut -f 10 -d \' \' | cut -c 2-"', 5), wibox.widget.textbox(' '), } } diff --git a/awesome/theme.lua b/awesome/theme.lua index bbe3edf..b321820 100644 --- a/awesome/theme.lua +++ b/awesome/theme.lua @@ -78,7 +78,7 @@ theme.notification_max_width = dpi(350) -- System Tray theme.bg_systray = theme.bg_normal -theme.systray_icon_spacing = dpi(5) +theme.systray_icon_spacing = dpi(15) -- Titlebars theme.titlebars_enabled = false