Add brightness control to niri

This commit is contained in:
pancakes 2025-08-08 16:22:53 +10:00
parent 4a5ea07130
commit c7e003b735
Signed by: pancakes
SSH key fingerprint: SHA256:dXkdWQrTpQspsYrfPT22O5KUAPNzQoIBnIBjRVSd3hI
2 changed files with 8 additions and 4 deletions

View file

@ -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

View file

@ -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
}