From 5ccb424079facbfc2538b5ec51a5a9c2f4f29a45 Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Thu, 10 Oct 2024 21:19:33 +0200 Subject: [PATCH] home/programs/niri: add play/pause, add settings button on fn key f12 --- home/programs/niri/binds.nix | 7 +++++++ home/programs/niri/default.nix | 6 ------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/home/programs/niri/binds.nix b/home/programs/niri/binds.nix index 12ef432..4fef5e7 100644 --- a/home/programs/niri/binds.nix +++ b/home/programs/niri/binds.nix @@ -140,6 +140,9 @@ in { action.spawn = ["wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"]; allow-when-locked = true; }; + "XF86AudioPlay" = { + action.spawn = ["playerctl" "play-pause"]; + }; "XF86MonBrightnessUp" = { action.spawn = ["brillo" "-q" "-u 300000" "-A 5"]; allow-when-locked = true; @@ -148,5 +151,9 @@ in { action.spawn = ["brillo" "-q" "-u 300000" "-U 5"]; 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"]; + }; }; } diff --git a/home/programs/niri/default.nix b/home/programs/niri/default.nix index 14e5f38..9a667e5 100644 --- a/home/programs/niri/default.nix +++ b/home/programs/niri/default.nix @@ -3,18 +3,12 @@ lib, pkgs, osConfig, - config, ... }: let colors = inputs.basix.schemeData.base16.${osConfig.style.scheme}.palette; in { imports = [./binds.nix]; - xdg.portal = { - enable = true; - extraPortals = [pkgs.xdg-desktop-portal pkgs.xdg-desktop-portal-gnome]; - configPackages = [config.programs.niri.package]; - }; programs.niri = { settings = { input.keyboard.xkb = {