From c0357d91f76127ebc46ba908c1016fd8f1a1df79 Mon Sep 17 00:00:00 2001 From: Joinemm Date: Thu, 25 Jan 2024 17:09:38 +0200 Subject: [PATCH] Use brightnessctl --- home-modules/xmonad/xmonad.hs | 9 ++++----- hosts/x1/home.nix | 1 + modules/laptop.nix | 7 +++++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/home-modules/xmonad/xmonad.hs b/home-modules/xmonad/xmonad.hs index ad20728..5bb914c 100644 --- a/home-modules/xmonad/xmonad.hs +++ b/home-modules/xmonad/xmonad.hs @@ -98,12 +98,12 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = (modm, xK_slash) ~> spawn "playerctl play-pause", (modm, xK_comma) ~> spawn "playerctl previous", (modm, xK_period) ~> spawn "playerctl next", - (0, xF86XK_AudioRaiseVolume) ~> spawn "audio-control up 5%", - (0, xF86XK_AudioLowerVolume) ~> spawn "audio-control down 5%", + (0, xF86XK_AudioRaiseVolume) ~> spawn "audio-control up 10%", + (0, xF86XK_AudioLowerVolume) ~> spawn "audio-control down 10%", (0, xF86XK_AudioMute) ~> spawn "audio-control mute", -- Brightness keys - (0, xF86XK_MonBrightnessUp) ~> spawn "sudo light -A 5", - (0, xF86XK_MonBrightnessDown) ~> spawn "sudo light -U 5", + (0, xF86XK_MonBrightnessUp) ~> spawn "brightnessctl s +10%", + (0, xF86XK_MonBrightnessDown) ~> spawn "brightnessctl s 10%-", -- close focused window (modm, xK_q) ~> kill, -- GAPS!!! @@ -203,7 +203,6 @@ myLayoutHook = ) $ gaps [(L, outerGap), (R, outerGap), (U, outerGap), (D, outerGap)] $ spacingRaw False (Border 10 10 10 10) True (Border 10 10 10 10) True - $ smartBorders myLayout toggleStrutsKey XConfig {XMonad.modMask = modm} = (modm, xK_b) diff --git a/hosts/x1/home.nix b/hosts/x1/home.nix index fea2b11..4c1cdea 100644 --- a/hosts/x1/home.nix +++ b/hosts/x1/home.nix @@ -34,6 +34,7 @@ gtk xmonad polybar + mpv ]) inputs.nixvim.homeManagerModules.nixvim inputs.nix-index-database.hmModules.nix-index diff --git a/modules/laptop.nix b/modules/laptop.nix index e37d2dc..b0bcf6f 100644 --- a/modules/laptop.nix +++ b/modules/laptop.nix @@ -1,4 +1,9 @@ {pkgs, ...}: { + + environment.systemPackages = with pkgs; [ + brightnessctl + ]; + services.xserver = { # caps lock is super xkbOptions = "caps:super"; @@ -18,8 +23,6 @@ powerManagement.powertop.enable = true; services.tlp.enable = true; - programs.light.enable = true; - # able to change backlight or turn off wifi without sudo security.sudo = { extraRules = [