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 = [
|
laptop_widgets = [
|
||||||
(
|
*(
|
||||||
[
|
[
|
||||||
widget.TextBox(text=" 🔆", padding=0, fontsize=14),
|
[
|
||||||
widget.Backlight(
|
widget.TextBox(text=" 🔆", padding=0, fontsize=14),
|
||||||
backlight_name=(backlight.splitlines()[0].split(",")[0]),
|
widget.Backlight(
|
||||||
change_command="brightnessctl set {0}%",
|
backlight_name=(backlight.splitlines()[0].split(",")[0]),
|
||||||
step=5,
|
change_command="brightnessctl set {0}%",
|
||||||
padding=5,
|
step=5,
|
||||||
),
|
padding=5,
|
||||||
|
),
|
||||||
|
]
|
||||||
]
|
]
|
||||||
if (backlight := run_command("brightnessctl -lm --class=backlight"))
|
if (backlight := run_command("brightnessctl -lm --class=backlight"))
|
||||||
else []
|
else []
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue