diff options
author | Anton Khirnov <anton@khirnov.net> | 2021-06-11 08:03:33 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2021-06-11 08:03:33 +0200 |
commit | 1a3db44e1b3edf2f71f65ac072c884c3fdad0bbf (patch) | |
tree | 6910907504c8eb7b47b1e081c4f9bbff9697821a | |
parent | 4c9aac8f721f3bdfcc7eef565a47c20208c7ab3b (diff) |
rc: scale systray icon size with DPI
-rw-r--r-- | rc.lua | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -59,8 +59,16 @@ local clock_date = wibox.widget.textclock("<span size=\"11500\">%a %F</span>", 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 = {} |