Add MPD controls

This commit is contained in:
Riley Apeldoorn 2023-06-15 11:54:40 +02:00 committed by Riley Apeldoorn
parent 25486dd6cb
commit b8e3b06570

View file

@ -61,6 +61,10 @@ in with lib; {
extraOptions = [ "--unsupported-gpu" ];
systemdIntegration = true;
extraConfig = ''
bindsym --release ${mod}+d exec ${sc}/bin/sc
'';
config = rec {
output."*".bg = "${../../data/wallpaper.jpg} fill";
input."type:keyboard".xkb_options = "caps:escape";
@ -75,7 +79,9 @@ in with lib; {
size = 8.0;
};
keybindings = mkMerge [
keybindings = let
mpc = "${pkgs.mpc-cli}/bin/mpc";
in mkMerge [
(genWorkspaces { inherit (cfg.wm.workspaces) numbered named; })
{
"${mod}+h" = "focus left";
@ -83,6 +89,9 @@ in with lib; {
"${mod}+k" = "focus up";
"${mod}+l" = "focus right";
"${mod}+semicolon" = "workspace prev_on_output";
"${mod}+apostrophe" = "workspace next_on_output";
"${mod}+Shift+h" = "move left";
"${mod}+Shift+j" = "move down";
"${mod}+Shift+k" = "move up";
@ -95,18 +104,23 @@ in with lib; {
"${mod}+Alt+a" = "layout toggle stacking splitv";
"${mod}+Alt+s" = "layout toggle tabbed splith";
"${mod}+q" = "exec ${pkgs.foot}/bin/foot";
"${mod}+Return" = "exec ${terminal}";
"${mod}+Escape" = "exec swaylock";
"${mod}+Tab" = "exec ${pkgs.firefox-wayland}/bin/firefox";
"${mod}+Alt+Tab" = "exec ${pkgs.google-chrome}/bin/google-chrome-stable --ozone-platform-hint=auto --enable-features=VaapiVideoDecoder,VaapiVideoEncoder";
"${mod}+Escape" = "exec swaylock";
"${mod}+Return" = "exec ${terminal}";
"${mod}+Alt+Return" = "exec ${pkgs.foot}/bin/foot";
"${mod}+Tab" = "exec ${pkgs.firefox-wayland}/bin/firefox";
"${mod}+Alt+Tab" = "exec ${pkgs.google-chrome}/bin/google-chrome-stable --ozone-platform-hint=auto --enable-features=VaapiVideoDecoder,VaapiVideoEncoder";
"${mod}+Backspace" = "mode kill";
"XF86AudioRaiseVolume" = "exec ${vol} raise";
"XF86AudioLowerVolume" = "exec ${vol} lower";
"XF86AudioMute" = "exec ${vol} toggle";
"XF86AudioPlay" = "nop";
"XF86AudioPlay" = "exec ${mpc} toggle";
"${mod}+comma" = "exec ${mpc} prev";
"${mod}+period" = "exec ${mpc} next";
"${mod}+slash" = "exec ${mpc} toggle";
}
];