Use icons

This commit is contained in:
Thomas Avé 2022-07-21 17:58:30 +02:00
parent 02375175ff
commit 4be245f9fd
2 changed files with 20 additions and 12 deletions

View File

@ -35,6 +35,12 @@ end)
-- Bar Creation -- 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{ local updates_indicator = wibox.widget{
{ {
@ -43,10 +49,18 @@ local updates_indicator = wibox.widget{
{ {
widget = awful.widget.watch('bash -c "checkupdates | wc -l"', 360), 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 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 widget = wibox.container.background
} }
@ -68,16 +82,10 @@ top_panel.create = function(s)
wibox.widget.textclock('%a %b %d, %H:%M:%S', 1), wibox.widget.textclock('%a %b %d, %H:%M:%S', 1),
{ {
layout = wibox.layout.fixed.horizontal, layout = wibox.layout.fixed.horizontal,
wibox.layout.margin(wibox.widget.systray(), dpi(5), dpi(5), dpi(5), dpi(5)), icons_widget,
wibox.widget.textbox(' '),
volume_widget({widget_type='arc'}),
wibox.widget.textbox(' '),
battery_widget({font=theme.font, display_notification=true}),
wibox.widget.textbox(' | '), wibox.widget.textbox(' | '),
updates_indicator, updates_indicator,
wibox.widget.textbox(' | '), 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.layout.margin(require("widgets.layout-box"), dpi(5), dpi(5), dpi(5), dpi(5)),
wibox.widget.textbox(' | '), wibox.widget.textbox(' | '),
lain.widget.mem({ lain.widget.mem({
@ -94,7 +102,7 @@ top_panel.create = function(s)
wibox.widget.textbox(' | '), 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), 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 | '), 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(' '), wibox.widget.textbox(' '),
} }
} }

View File

@ -78,7 +78,7 @@ theme.notification_max_width = dpi(350)
-- System Tray -- System Tray
theme.bg_systray = theme.bg_normal theme.bg_systray = theme.bg_normal
theme.systray_icon_spacing = dpi(5) theme.systray_icon_spacing = dpi(15)
-- Titlebars -- Titlebars
theme.titlebars_enabled = false theme.titlebars_enabled = false