diff --git a/hosts/skadi/configuration.nix b/hosts/skadi/configuration.nix index ab20d2e..a23e7d7 100644 --- a/hosts/skadi/configuration.nix +++ b/hosts/skadi/configuration.nix @@ -116,6 +116,9 @@ # Setup gpu fan curves and light undervolt services.lact.enable = true; + # Setup display brightness changing using ddcutil + hardware.i2c.enable = true; + # Setup rgb control services.hardware.openrgb.enable = true; @@ -291,6 +294,7 @@ lm_sensors libva-utils alsa-utils + ddcutil ]; # Enable nixd to see nixpkgs path diff --git a/modules/linux/home-manager/hyprland.nix b/modules/linux/home-manager/hyprland.nix index 63c23f2..3ac32b9 100644 --- a/modules/linux/home-manager/hyprland.nix +++ b/modules/linux/home-manager/hyprland.nix @@ -276,9 +276,14 @@ in { ]; bindel = [ + # Volume bindings ", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ --limit 1 && ${volume-notify}/bin/volume-notify" ", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- --limit 1 && ${volume-notify}/bin/volume-notify" ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && ${volume-notify}/bin/volume-notify" + + # Brightness bindings + "$mod, XF86AudioRaiseVolume, exec, ddcutil -d 1 setvcp 10 + 5" + "$mod, XF86AudioLowerVolume, exec, ddcutil -d 1 setvcp 10 - 5" ]; # Requires playerctl