From 1eb607d75aab6141957ca7a303a376d5b270b78b Mon Sep 17 00:00:00 2001 From: Martin Rys Date: Sat, 21 Sep 2024 21:35:56 +0200 Subject: [PATCH] OSD: Specify GtkLayerShell version to prevent an annoying warning --- scc/osd/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scc/osd/__init__.py b/scc/osd/__init__.py index e59f7f34..b50b5aa1 100644 --- a/scc/osd/__init__.py +++ b/scc/osd/__init__.py @@ -1,6 +1,4 @@ -#!/usr/bin/env python3 -""" -SC-Controller - OSD +"""SC-Controller - OSD. Common methods for OSD-related stuff """ @@ -54,6 +52,8 @@ def __init__(self, wmclass, layer = None): self.set_wmclass(wmclass, wmclass) self.using_wlroots = False try: + import gi + gi.require_version("GtkLayerShell", "0.1") from gi.repository import GtkLayerShell if GtkLayerShell.is_supported(): self.using_wlroots=True @@ -114,7 +114,7 @@ def _apply_css(config): def _add_arguments(self): - """ Should be overriden AND called by child class """ + """Should be overriden AND called by child class.""" self.argparser.add_argument('-x', type=int, metavar="pixels", default=20, help="""horizontal position in pixels, from left side of screen. Use negative value to specify as distance from right side (default: 20)""")