home/programs/niri: add play/pause, add settings button on fn key f12

This commit is contained in:
Anthony Rodriguez 2024-10-10 21:19:33 +02:00
parent 8b7164739d
commit 5ccb424079
Signed by: nezia
GPG key ID: EE3BE97C040A86CE
2 changed files with 7 additions and 6 deletions

View file

@ -140,6 +140,9 @@ in {
action.spawn = ["wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"]; action.spawn = ["wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"];
allow-when-locked = true; allow-when-locked = true;
}; };
"XF86AudioPlay" = {
action.spawn = ["playerctl" "play-pause"];
};
"XF86MonBrightnessUp" = { "XF86MonBrightnessUp" = {
action.spawn = ["brillo" "-q" "-u 300000" "-A 5"]; action.spawn = ["brillo" "-q" "-u 300000" "-A 5"];
allow-when-locked = true; allow-when-locked = true;
@ -148,5 +151,9 @@ in {
action.spawn = ["brillo" "-q" "-u 300000" "-U 5"]; action.spawn = ["brillo" "-q" "-u 300000" "-U 5"];
allow-when-locked = true; allow-when-locked = true;
}; };
# set on media key since framework laptops have a gear as the button label
"XF86AudioMedia" = {
action.spawn = ["sh" "-c" "env XDG_CURRENT_DESKTOP=gnome gnome-control-center"];
};
}; };
} }

View file

@ -3,18 +3,12 @@
lib, lib,
pkgs, pkgs,
osConfig, osConfig,
config,
... ...
}: let }: let
colors = inputs.basix.schemeData.base16.${osConfig.style.scheme}.palette; colors = inputs.basix.schemeData.base16.${osConfig.style.scheme}.palette;
in { in {
imports = [./binds.nix]; imports = [./binds.nix];
xdg.portal = {
enable = true;
extraPortals = [pkgs.xdg-desktop-portal pkgs.xdg-desktop-portal-gnome];
configPackages = [config.programs.niri.package];
};
programs.niri = { programs.niri = {
settings = { settings = {
input.keyboard.xkb = { input.keyboard.xkb = {