From c7e003b7356fbfba76b6cc77c6aa1236b1417dbf Mon Sep 17 00:00:00 2001 From: pancakes Date: Fri, 8 Aug 2025 16:22:53 +1000 Subject: [PATCH] Add brightness control to niri --- justfile | 2 +- niri/dot-config/niri/config.kdl | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/justfile b/justfile index 697ccbb..c891c8b 100644 --- a/justfile +++ b/justfile @@ -96,7 +96,7 @@ kitty-terminal: [group("graphical")] niri-window-manager: @just _echowarning "1) Installing niri and related tools" - paru -S cliphist fuzzel gdm gnome-keyring inter-font mako niri-git noto-fonts noto-fonts-cjk noto-fonts-emoji noto-fonts-extra polkit-kde-agent swayidle swaylock ttf-firacode-nerd ttf-font-awesome waybar wl-clipboard wlsunset wpaperd xdg-desktop-portal-gnome xwayland-satellite-git + paru -S brightnessctl cliphist fuzzel gdm gnome-keyring inter-font mako niri-git noto-fonts noto-fonts-cjk noto-fonts-emoji noto-fonts-extra polkit-kde-agent swayidle swaylock ttf-firacode-nerd ttf-font-awesome waybar wl-clipboard wlsunset wpaperd xdg-desktop-portal-gnome xwayland-satellite-git @just _echowarning "\n2) Stowing niri config" stow --dotfiles -S niri diff --git a/niri/dot-config/niri/config.kdl b/niri/dot-config/niri/config.kdl index 15fbc56..49a3dbe 100644 --- a/niri/dot-config/niri/config.kdl +++ b/niri/dot-config/niri/config.kdl @@ -232,9 +232,6 @@ binds { Control+Shift+Escape { spawn "kitty" "-e" "btop" } - // You can also use a shell. Do this if you need pipes, multiple commands, etc. - // Note: the entire command goes as a single argument in the end. - // Mod+T { spawn "bash" "-c" "notify-send hello && exec alacritty"; } // Volume keys mappings for PipeWire & WirePlumber. XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+" @@ -248,6 +245,13 @@ binds { XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle" } + // Brightness keys mappings + XF86MonBrightnessDown allow-when-locked=true { + spawn "brightnessctl" "set" "5%-"; + } + XF86MonBrightnessUp allow-when-locked=true { + spawn "brightnessctl" "set" "5%+"; + } Alt+F4 { close-window }