From a48ad4852380e7a3d567f0dc2468a6fdb564011b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kha=C3=AFs=20COLIN?= Date: Tue, 29 Oct 2024 13:47:04 +0100 Subject: [PATCH] feat(void): add brightness control keybinds --- void.nix | 7 ++++++- wm/river.nix | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/void.nix b/void.nix index acf4400..609cef6 100644 --- a/void.nix +++ b/void.nix @@ -1,7 +1,7 @@ # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, ... }: +{ config, pkgs, ... }: { imports = [ ./hardware-configuration-void.nix @@ -46,4 +46,9 @@ ]; boot.kernelModules = ["i2c-dev" "ddcci_backlight"]; hardware.i2c.enable = true; + + # package for controlling brightness on external monitor + environment.systemPackages = [ + pkgs.ddcutil + ]; } diff --git a/wm/river.nix b/wm/river.nix index bdbf7be..b732468 100644 --- a/wm/river.nix +++ b/wm/river.nix @@ -16,6 +16,8 @@ in { # screen backlight brightness control riverctl map -repeat normal None XF86MonBrightnessDown spawn 'brightnessctl set 1%-' riverctl map -repeat normal None XF86MonBrightnessUp spawn 'brightnessctl set 1%+' + riverctl map -repeat normal Super 'Prior' spawn 'ddcutil setvcp 10 + 10' + riverctl map -repeat normal Super 'Next' spawn 'ddcutil setvcp 10 - 10' # layout management riverctl map -repeat normal Super+Alt H send-layout-cmd rivertile 'main-ratio -0.05'