From b3530d7c4a102935fa26498a160ee1dc6c1e9c03 Mon Sep 17 00:00:00 2001 From: delta Date: Fri, 4 Jul 2025 00:38:29 +0200 Subject: :3 --- .../awesome/ui/statusbar/panel/widgets/wifi.lua | 27 ++++++++++++---------- 1 file changed, 15 insertions(+), 12 deletions(-) (limited to '.config/awesome/ui/statusbar/panel/widgets/wifi.lua') diff --git a/.config/awesome/ui/statusbar/panel/widgets/wifi.lua b/.config/awesome/ui/statusbar/panel/widgets/wifi.lua index ad2234f..8ccff95 100644 --- a/.config/awesome/ui/statusbar/panel/widgets/wifi.lua +++ b/.config/awesome/ui/statusbar/panel/widgets/wifi.lua @@ -1,27 +1,30 @@ local lgi = require "lgi" local phosphor = require "assets.phosphor" +local qcolor = require "quarrel.color" local qui = require "quarrel.ui" -local qvars = require "quarrel.vars" local wibox = require "wibox" local glib = lgi.GLib +local wifi_icon = qui.icon { + icon = phosphor.wifi_x_fill, + color = qcolor.palette.red(), + widget = { + id = "icon", + }, +} + local wifi = wibox.widget(qui.styled { widget = wibox.container.background, + bg = qcolor.palette.bg.high, { widget = wibox.container.margin, - margins = qvars.big_padding, + margins = qui.BIG_PADDING, { { widget = wibox.container.place, valign = "center", halign = "center", - qui.icon { - icon = phosphor.wifi_x_fill, - color = qvars.colors.red, - widget = { - id = "icon", - }, - }, + wifi_icon, }, { widget = wibox.widget.textbox, @@ -29,7 +32,7 @@ local wifi = wibox.widget(qui.styled { id = "essid", }, layout = wibox.layout.fixed.horizontal, - spacing = qvars.padding, + spacing = qui.PADDING, }, }, }) @@ -43,8 +46,8 @@ awesome.connect_signal("services::wifi", function(essid, _, connected) end) awesome.connect_signal("services::wifi::icon", function(icon, color) - wifi:get_children_by_id("icon")[1].image = icon - wifi:get_children_by_id("icon")[1].stylesheet = qui.recolor(color) + wifi_icon.image = icon + wifi_icon.stylesheet = qui.recolor(color) end) return wifi -- cgit v1.2.3