From a1dfbff962f2983255ed7a0c333aca9c6a17ab04 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 10 Feb 2026 06:29:26 +0000 Subject: [PATCH] fix: convert enabled string to boolean in custom commands The enabled flag from config was stored as string 'False'/'True' instead of being converted to boolean. This caused disabled commands to still appear in the right-click menu because non-empty strings are truthy in Python. Now properly converts string values to boolean. Fixes #1047 --- terminatorlib/plugins/custom_commands.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/terminatorlib/plugins/custom_commands.py b/terminatorlib/plugins/custom_commands.py index 99d45ac5..3733a501 100644 --- a/terminatorlib/plugins/custom_commands.py +++ b/terminatorlib/plugins/custom_commands.py @@ -73,7 +73,9 @@ def __init__( self): name = s["name"] name_parse = s.get("name_parse", "True") command = s["command"] - enabled = s["enabled"] and s["enabled"] or False + enabled = s.get("enabled", False) + if isinstance(enabled, str): + enabled = enabled.lower() in ("true", "1", "yes") if "position" in s: self.cmd_list[int(s["position"])] = {'enabled' : enabled, 'name' : name,