From a59f117dff656ddbc028cdd1ab3c8dc0c5345884 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Wed, 28 Aug 2024 14:19:39 -0700 Subject: [PATCH] feat: add media controls --- modules/linux/audio/default.nix | 2 ++ users/youwen/linux/hyprland/common.nix | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/linux/audio/default.nix b/modules/linux/audio/default.nix index 9134b21..f98240c 100755 --- a/modules/linux/audio/default.nix +++ b/modules/linux/audio/default.nix @@ -14,4 +14,6 @@ # no need to redefine it in your config for now) #media-session.enable = true; }; + + services.playerctld.enable = true; } diff --git a/users/youwen/linux/hyprland/common.nix b/users/youwen/linux/hyprland/common.nix index d970051..ff0843f 100644 --- a/users/youwen/linux/hyprland/common.nix +++ b/users/youwen/linux/hyprland/common.nix @@ -113,8 +113,11 @@ "$mod, I, exec, hyprlock" - # System control + # Media controls ",XF86AudioMute, exec, pamixer -t" + ",XF86AudioPlay, exec, playerctl play-pause" + ",XF86AudioNext, exec, playerctl next" + ",XF86AudioRewind, exec, playerctl previous" ] ++ ( if pkgs.system != "aarch64-linux"