From 63e03314ee4035efde7f1c6576143a1bf374ffdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Fri, 11 Mar 2022 18:44:19 +0100 Subject: [PATCH] feat: Add media button support fix #61 --- config/programs/sway.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config/programs/sway.nix b/config/programs/sway.nix index b868eb1a..e16f71d2 100644 --- a/config/programs/sway.nix +++ b/config/programs/sway.nix @@ -36,6 +36,16 @@ "${modifier}+Return" = "exec ${pkgs.alacritty}/bin/alacritty"; "${modifier}+d" = "exec ${pkgs.wofi}/bin/wofi --show drun"; "Print" = "mode screenshot"; + "XF86AudioRaiseVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%"; + "XF86AudioLowerVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%"; + "XF86AudioMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle"; + "XF86MicMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle"; + "XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl set 5%-"; + "XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl set +5%"; + "XF86AudioPlay" = "exec ${pkgs.mpc-cli}/bin/mpc toggle"; + "XF86AudioNext" = "exec ${pkgs.mpc-cli}/bin/mpc next"; + "XF86AudioPrev" = "exec ${pkgs.mpc-cli}/bin/mpc prev"; + "XF86AudioStop" = "exec ${pkgs.mpc-cli}/bin/mpc stop"; }; bars = [ {