From 64f41c48256b9f35834f52c8465c4e07ac34cbef Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Fri, 31 Dec 2021 22:16:18 +0100 Subject: [PATCH] xsecurelock: only display weather on first screen --- bin/xsecurelock-saver | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/xsecurelock-saver b/bin/xsecurelock-saver index 848540c..7a80ea3 100755 --- a/bin/xsecurelock-saver +++ b/bin/xsecurelock-saver @@ -106,7 +106,7 @@ def on_overlay_draw(widget, cctx, ctx): # We can have polybar markups in it. We assume %{Tx} means to use # Font Awesome 6 and we ignore font color change. The parsing is # quite basic. - if ctx.weather: + if ctx.weather and ctx.position == (0, 0): data = re.sub(r"%{F[#\d+-]+?}", "", ctx.weather) data = re.split(r"(%{T[1-9-]})", data) font = ctx.font_family @@ -184,7 +184,7 @@ if __name__ == "__main__": ctx.background = None ctx.weather = None ctx.clock = None - ctx.position = [0, 0] + ctx.position = (0, 0) ctx.window = Gtk.Window() ctx.window.set_app_paintable(True)