config/qtile: properly hide brightness widget when not supported
This commit is contained in:
parent
c1bca8235b
commit
1aaf38d3e6
1 changed files with 10 additions and 8 deletions
|
@ -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 []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue