From caff89ca3b07568d77802c7231cd2e0c15fcdc51 Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Thu, 5 Jan 2023 18:57:30 -0800 Subject: [PATCH] Add brightness control --- hosts/thinkpads/home.nix | 1 + hosts/thinkpads/i3.nix | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 hosts/thinkpads/i3.nix diff --git a/hosts/thinkpads/home.nix b/hosts/thinkpads/home.nix index c68ffd9..57d63fd 100644 --- a/hosts/thinkpads/home.nix +++ b/hosts/thinkpads/home.nix @@ -1,5 +1,6 @@ { pkgs, ... }: { imports = [ ./polybar.nix + ./i3.nix ]; } diff --git a/hosts/thinkpads/i3.nix b/hosts/thinkpads/i3.nix new file mode 100644 index 0000000..d37106c --- /dev/null +++ b/hosts/thinkpads/i3.nix @@ -0,0 +1,12 @@ +{ pkgs, lib, ... }: + +{ + home.packages = with pkgs; [ + brightnessctl + ]; + + xsession.windowManager.i3.config.keybindings = lib.mkOptionDefault { + "XF86MonBrightnessUp" = "exec --no-startup-id brightnessctl set +5%"; + "XF86MonBrightnessDown" = "exec --no-startup-id brightnessctl set 5%-"; + }; +}