diff --git a/lyrathorpe/home/sway.nix b/lyrathorpe/home/sway.nix index 9ba4acd..27e6772 100644 --- a/lyrathorpe/home/sway.nix +++ b/lyrathorpe/home/sway.nix @@ -120,27 +120,29 @@ in } ]; - keybindings = lib.mkMerge [ - # Bind the launcher to Mod+Space. This deliberately replaces the default - # Mod+Space (focus mode_toggle); a bare attrset (normal priority) wins - # over the module default, whereas the mkOptionDefault block below would - # only tie with it. Mod+d still runs the launcher too (module default). - { "${modifier}+space" = "exec ${menu}"; } - (lib.mkOptionDefault ( - { - "${modifier}+l" = "exec ${pkgs.swaylock}/bin/swaylock -f"; - "Print" = "exec ${pkgs.grim}/bin/grim ~/screenshot-$(date +%F-%H%M%S).png"; - "XF86AudioRaiseVolume" = "exec ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"; - "XF86AudioLowerVolume" = "exec ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"; - "XF86AudioMute" = "exec ${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; - } - # Screen backlight: laptops only (no internal backlight on a desktop). - // lib.optionalAttrs portable { - "XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl set 5%+"; - "XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl set 5%-"; - } - )) - ]; + # NB: this whole set is wrapped in mkOptionDefault so it MERGES with the + # home-manager module's default keybindings (same priority) rather than + # replacing them. Do not wrap it in mkMerge with a normal-priority attr -- + # that makes the normal-priority def win and silently drops every default + # bind (terminal, movement, workspaces, ...). + keybindings = lib.mkOptionDefault ( + { + # Launcher on Mod+Space. mkForce overrides the module's own default + # Mod+Space (focus mode_toggle); a plain value would conflict with it + # at equal priority. Mod+d also still runs the launcher (module default). + "${modifier}+space" = lib.mkForce "exec ${menu}"; + "${modifier}+l" = "exec ${pkgs.swaylock}/bin/swaylock -f"; + "Print" = "exec ${pkgs.grim}/bin/grim ~/screenshot-$(date +%F-%H%M%S).png"; + "XF86AudioRaiseVolume" = "exec ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"; + "XF86AudioLowerVolume" = "exec ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"; + "XF86AudioMute" = "exec ${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; + } + # Screen backlight: laptops only (no internal backlight on a desktop). + // lib.optionalAttrs portable { + "XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl set 5%+"; + "XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl set 5%-"; + } + ); }; }; @@ -148,8 +150,13 @@ in # `terminal` above still launches the same binary, now themed. programs.foot = { enable = true; + # foot 1.27: the bare [colors] section is deprecated in favour of + # [colors-dark] (the default theme), and the cursor colour moved out of + # [cursor] (where `color` is now rejected) into a `cursor` key here, written + # " " (man foot.ini(5): "ff0000 00ff00" => green cursor, red + # text). Only colors-dark is needed; we never set initial-color-theme=light. settings = { - colors = { + "colors-dark" = { background = ctp.base; foreground = ctp.text; regular0 = ctp.surface1; @@ -170,8 +177,8 @@ in bright7 = ctp.subtext0; "selection-foreground" = ctp.base; "selection-background" = ctp.rosewater; + cursor = "${ctp.base} ${ctp.rosewater}"; }; - cursor.color = "${ctp.base} ${ctp.rosewater}"; }; };