mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 19:51:34 +01:00
Switch to the backlight controller brillo
This commit is contained in:
parent
f6ce8165b6
commit
fb9ecf85a0
3 changed files with 12 additions and 5 deletions
|
|
@ -31,4 +31,6 @@
|
||||||
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
services.gvfs.enable = true;
|
services.gvfs.enable = true;
|
||||||
|
|
||||||
|
hardware.brillo.enable = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ in {
|
||||||
|
|
||||||
# Hotkey dependencies
|
# Hotkey dependencies
|
||||||
pkgs.playerctl
|
pkgs.playerctl
|
||||||
pkgs.brightnessctl
|
|
||||||
];
|
];
|
||||||
|
|
||||||
home.file.".background-image".source = cfg.wallpaper;
|
home.file.".background-image".source = cfg.wallpaper;
|
||||||
|
|
@ -37,6 +36,13 @@ in {
|
||||||
services.dunst.enable = true;
|
services.dunst.enable = true;
|
||||||
|
|
||||||
xdg.configFile."qtile/config.py".text = let
|
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 =
|
backlightWidget =
|
||||||
if cfg.widget.backlight.enable
|
if cfg.widget.backlight.enable
|
||||||
then ''
|
then ''
|
||||||
|
|
@ -100,8 +106,7 @@ in {
|
||||||
Key([], "XF86AudioRaiseVolume", lazy.spawn("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"), desc="Raise volume"),
|
Key([], "XF86AudioRaiseVolume", lazy.spawn("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"), desc="Raise volume"),
|
||||||
|
|
||||||
# Brightness controls
|
# Brightness controls
|
||||||
Key([], "XF86MonBrightnessUp", lazy.spawn("brightnessctl set +5%"), desc="Raise brightness"),
|
${backlightKeys}
|
||||||
Key([], "XF86MonBrightnessDown", lazy.spawn("brightnessctl set 5%-"), desc="Lower brightness"),
|
|
||||||
|
|
||||||
# Move window focus
|
# Move window focus
|
||||||
Key([mod], left, lazy.layout.left(), desc="Move focus to left"),
|
Key([mod], left, lazy.layout.left(), desc="Move focus to left"),
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Sebastian Stork";
|
description = "Sebastian Stork";
|
||||||
hashedPasswordFile = config.sops.secrets."password/seb".path;
|
hashedPasswordFile = config.sops.secrets."password/seb".path;
|
||||||
extraGroups = ["wheel" "networkmanager" "libvirtd"];
|
extraGroups = ["wheel" "networkmanager" "libvirtd" "video"];
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.seb = ./home.nix;
|
home-manager.users.seb = ./home.nix;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue