diff --git a/modules/home/de/default.nix b/modules/home/de/default.nix index 9a00997..4320c12 100644 --- a/modules/home/de/default.nix +++ b/modules/home/de/default.nix @@ -1,4 +1,4 @@ -{lib, ...}: { +{ imports = [ ./qtile.nix ./hyprland @@ -9,16 +9,4 @@ ./waybar.nix ./hypridlelock.nix ]; - - options.myConfig.de = { - widget = { - backlight = { - enable = lib.mkEnableOption ""; - device = lib.mkOption { - type = lib.types.str; - }; - }; - battery.enable = lib.mkEnableOption ""; - }; - }; } diff --git a/modules/home/de/qtile.nix b/modules/home/de/qtile.nix index a9120f1..983b029 100644 --- a/modules/home/de/qtile.nix +++ b/modules/home/de/qtile.nix @@ -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, ), diff --git a/users/seb/@seb-laptop.nix b/users/seb/@seb-laptop.nix index c3a69cc..2fc9597 100644 --- a/users/seb/@seb-laptop.nix +++ b/users/seb/@seb-laptop.nix @@ -2,14 +2,6 @@ imports = [./default.nix]; home-manager.users.seb = { - myConfig.de.widget = { - backlight = { - enable = true; - device = "amdgpu_bl1"; - }; - battery.enable = true; - }; - wayland.windowManager.hyprland.settings.monitor = "eDP-1,1920x1080@60,0x0,1"; services.hypridle = {