Remove special widget control for qtile

This commit is contained in:
SebastianStork 2024-04-16 22:18:23 +02:00
parent 4b650721b0
commit cbebff390c
3 changed files with 8 additions and 47 deletions

View file

@ -36,29 +36,7 @@ in {
services.dunst.enable = true;
xdg.configFile."qtile/config.py".text = let
backlightKeys =
if cfg.widget.backlight.enable
then ''
Key([], "XF86MonBrightnessUp", lazy.spawn("brillo -q -s ${cfg.widget.backlight.device} -u 50000 -A 4"), desc="Raise brightness"),
Key([], "XF86MonBrightnessDown", lazy.spawn("brillo -q -s ${cfg.widget.backlight.device} -u 50000 -U 4"), desc="Lower brightness"),
''
else "";
backlightWidget =
if cfg.widget.backlight.enable
then ''
widget.Sep(),
widget.Backlight(fmt="󰃠 {}", backlight_name='${cfg.widget.backlight.device}'),
''
else "";
batteryWidget =
if cfg.widget.battery.enable
then ''
widget.Sep(),
widget.Battery(format="󰁹 {percent:2.0%}"),
''
else "";
in ''
xdg.configFile."qtile/config.py".text = ''
import os
import subprocess
@ -107,7 +85,8 @@ in {
Key([], "XF86AudioRaiseVolume", lazy.spawn("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"), desc="Raise volume"),
# Brightness controls
${backlightKeys}
Key([], "XF86MonBrightnessUp", lazy.spawn("brillo -q -u 50000 -A 4"), desc="Raise brightness"),
Key([], "XF86MonBrightnessDown", lazy.spawn("brillo -q -u 50000 -U 4"), desc="Lower brightness"),
# Move window focus
Key([mod], left, lazy.layout.left(), desc="Move focus to left"),
@ -183,8 +162,10 @@ in {
]),
widget.Sep(),
widget.PulseVolume(fmt="󰕾 {}"),
${backlightWidget}
${batteryWidget}
widget.Sep(),
widget.Backlight(fmt="󰃠 {}", backlight_name='amdgpu_bl1'),
widget.Sep(),
widget.Battery(format="󰁹 {percent:2.0%}"),
],
26,
),