From 1aaf38d3e624ab658008fa6fb6c6f3fea86da529 Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Tue, 31 Oct 2023 09:34:44 -0400 Subject: [PATCH] config/qtile: properly hide brightness widget when not supported --- users/infinidoge/config/qtile/config.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/users/infinidoge/config/qtile/config.py b/users/infinidoge/config/qtile/config.py index 06ae6e8..9b83b09 100644 --- a/users/infinidoge/config/qtile/config.py +++ b/users/infinidoge/config/qtile/config.py @@ -628,15 +628,17 @@ def init_widget_list(main=True, laptop=False): ] laptop_widgets = [ - ( + *( [ - widget.TextBox(text=" 🔆", padding=0, fontsize=14), - widget.Backlight( - backlight_name=(backlight.splitlines()[0].split(",")[0]), - change_command="brightnessctl set {0}%", - step=5, - padding=5, - ), + [ + widget.TextBox(text=" 🔆", padding=0, fontsize=14), + widget.Backlight( + backlight_name=(backlight.splitlines()[0].split(",")[0]), + change_command="brightnessctl set {0}%", + step=5, + padding=5, + ), + ] ] if (backlight := run_command("brightnessctl -lm --class=backlight")) else []