From 1a3db44e1b3edf2f71f65ac072c884c3fdad0bbf Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Fri, 11 Jun 2021 08:03:33 +0200 Subject: rc: scale systray icon size with DPI --- rc.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/rc.lua b/rc.lua index 97e98f6..359fd59 100644 --- a/rc.lua +++ b/rc.lua @@ -59,8 +59,16 @@ local clock_date = wibox.widget.textclock("%a %F", 6 clock_time:set_align("center") clock_date:set_align("center") +-- systray +local tray_icon_size = 24 local systray = wibox.widget.systray() -systray:set_base_size(32) + +function update_systray_iconsize() + systray:set_base_size(beautiful.xresources.apply_dpi(tray_icon_size, screen.primary)) +end + +screen.connect_signal('primary_changed', update_systray_iconsize) +update_systray_iconsize() -- Create a wibox for each screen and add it mywibox = {} -- cgit v1.2.3