From d8f6399394d1abc8ada3dc2ecc2cd5e9e56a1363 Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Fri, 11 Nov 2022 14:42:31 +0100 Subject: [PATCH] [Newm] Have an easier time enabling/disabling app id logging --- .config/newm/config.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.config/newm/config.py b/.config/newm/config.py index 4582917..a8580f0 100644 --- a/.config/newm/config.py +++ b/.config/newm/config.py @@ -15,6 +15,8 @@ from pywm import PYWM_MOD_LOGO, PYWM_MOD_ALT logger = logging.getLogger(__name__) +debug_windows = False + def run_shell(command: str): """Run a shell command asynchronously @@ -92,9 +94,10 @@ def synchronous_update() -> None: def rules(m_view): blur_apps = ("kitty", "wofi", "emacsclient", "emacs") float_apps = ("Rofi",) - # with open("/tmp/newm_windows.txt", "a", encoding="utf-8") as file: - # file.write(str(m_view.app_id)) - # file.write("\n") + if debug_windows: + with open("/tmp/newm_windows.txt", "a", encoding="utf-8") as file: + file.write(str(m_view.app_id)) + file.write("\n") m_rules = {} if m_view.app_id in blur_apps: m_rules.update({"blur": {"radius": 6, "passes": 2}})