From 925ce4af5d7121119a26e6e33c716935abd1b422 Mon Sep 17 00:00:00 2001 From: twoneis Date: Thu, 25 Apr 2024 15:12:05 +0200 Subject: [PATCH] added brightness control TODO: min value --- modules/system/niri/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/system/niri/default.nix b/modules/system/niri/default.nix index 60c0ba8..15b5cfd 100644 --- a/modules/system/niri/default.nix +++ b/modules/system/niri/default.nix @@ -1,5 +1,11 @@ -{ lib, config, ... }: lib.mkIf (config.withNiri) { +{ lib, config, pkgs, ... }: lib.mkIf (config.withNiri) { programs.niri.enable = true; + environment.systemPackages = with pkgs; [ + brightnessctl + waybar + swaybg + pamixer + ]; home-manager.users.twoneis = { programs.niri = { settings = { @@ -77,6 +83,7 @@ { command = ["swaybg" "-i" "${../../../wallpaper/wallpaper.png}" "-m" "fill"]; } { command = ["pamixer" "--set-volume" "0"]; } { command = ["systemctl" "--user" "restart" "spotifyd.service"]; } + { command = ["brightnessctl" "s" "50"]; } ]; binds = { @@ -86,6 +93,8 @@ "XF86AudioRaiseVolume".action.spawn = ["pamixer" "-i" "5"]; "XF86AudioLowerVolume".action.spawn = ["pamixer" "-d" "5"]; + "XF86MonBrightnessDown".action.spawn = ["brightnessctl" "-n=10%" "s" "5%-"]; + "XF86MonBrightnessUp".action.spawn = ["brightnessctl" "s" "5%+"]; "Mod+Backspace".action.close-window = [];