Support sound keys on both devices

This commit is contained in:
Daniel Siepmann 2022-11-04 10:22:06 +01:00
parent 299043951d
commit e5fed99efa
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
2 changed files with 7 additions and 5 deletions

View file

@ -1,7 +1,9 @@
{ config, pkgs }: { config, pkgs, ownLib }:
let let
modifier = config.xsession.windowManager.i3.config.modifier; modifier = config.xsession.windowManager.i3.config.modifier;
soundSwitcherForHikari2 = if ownLib.onHikari { } then "" else "-D pulse";
in { in {
enable = true; enable = true;
config = { config = {
@ -285,9 +287,9 @@ in {
"XF86AudioPlay" = "exec cmus-remote --pause"; "XF86AudioPlay" = "exec cmus-remote --pause";
"XF86AudioPrev" = "exec cmus-remote --prev"; "XF86AudioPrev" = "exec cmus-remote --prev";
"XF86AudioNext" = "exec cmus-remote --next"; "XF86AudioNext" = "exec cmus-remote --next";
"XF86AudioMute" = "exec \"amixer -D pulse sset Master 0\""; "XF86AudioMute" = "exec \"amixer ${soundSwitcherForHikari2} sset Master 0\"";
"XF86AudioRaiseVolume" = "exec \"amixer -D pulse sset Master 5%+\""; "XF86AudioRaiseVolume" = "exec \"amixer ${soundSwitcherForHikari2} sset Master 5%+\"";
"XF86AudioLowerVolume" = "exec \"amixer -D pulse sset Master 5%-\""; "XF86AudioLowerVolume" = "exec \"amixer ${soundSwitcherForHikari2} sset Master 5%-\"";
# Switch sound device: # Switch sound device:
# https://askubuntu.com/a/72076/491377 # https://askubuntu.com/a/72076/491377

View file

@ -36,6 +36,6 @@ in {
''; '';
windowManager.i3 = import ./windowManager/i3.nix { windowManager.i3 = import ./windowManager/i3.nix {
inherit config pkgs; inherit config pkgs ownLib;
}; };
} }