Support sound keys on both devices
This commit is contained in:
parent
299043951d
commit
e5fed99efa
|
@ -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
|
||||||
|
|
|
@ -36,6 +36,6 @@ in {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
windowManager.i3 = import ./windowManager/i3.nix {
|
windowManager.i3 = import ./windowManager/i3.nix {
|
||||||
inherit config pkgs;
|
inherit config pkgs ownLib;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue