From 8f5b75ea18b996d20af2a907681f1bd462dae25c Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Sun, 25 Sep 2022 12:41:54 -0400 Subject: [PATCH] setup media keys --- home-manager/linux/programs/media.nix | 1 + home-manager/linux/programs/sway.nix | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/home-manager/linux/programs/media.nix b/home-manager/linux/programs/media.nix index d321d82..44fe989 100644 --- a/home-manager/linux/programs/media.nix +++ b/home-manager/linux/programs/media.nix @@ -19,6 +19,7 @@ in nicotine-plus irisDesktopItem picard + mpc-cli ]; # Mopidy service # TODO: Add scrobbling diff --git a/home-manager/linux/programs/sway.nix b/home-manager/linux/programs/sway.nix index 24876d6..b054d8d 100644 --- a/home-manager/linux/programs/sway.nix +++ b/home-manager/linux/programs/sway.nix @@ -154,6 +154,14 @@ with lib; "${modifer}+Ctrl+x" = "exec ${pkgs.sway-contrib.grimshot}/bin/grimshot copy window"; # Clpy entire output to clipboard "${modifer}+Alt+x" = "exec ${pkgs.sway-contrib.grimshot}/bin/grimshot copy output"; + # Make the mute key work + "XF86AudioMute" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle"; + # Make the volume keys work + "XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +5%"; + "XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -5%"; + # Play/pause and next song + "XF86AudioPlay" = "exec mpc toggle"; + "XF86AudioNext" = "exec mpc next"; }; # Startup applications startup = [