fix(sway): restore clobbered keybindings; update foot for 1.27
Two desktop-config fixes found together:
1. Keybindings: the previous Mod+Space launcher bind wrapped the set in
`lib.mkMerge [ { ... } (mkOptionDefault ...) ]`. A normal-priority
definition there wins over (and discards) the home-manager module's
default keybindings, which are at mkOptionDefault priority -- so every
default bind (terminal Mod+Return, movement, workspaces, kill, ...) and
even the custom swaylock/volume binds silently vanished; only Mod+Space
survived. That is why Super+Enter opened nothing. Restore the single
mkOptionDefault wrapper (so it merges with the module defaults) and
override just Mod+Space via lib.mkForce to beat the module's default
focus-mode_toggle without a same-priority conflict. Generated config
goes from 1 bindsym back to 57.
2. foot 1.27: the bare [colors] section is deprecated in favour of
[colors-dark], and `[cursor] color` is rejected ("not a valid option:
color"). Move the palette to colors-dark and set the cursor colour via
its `cursor` key ("<text> <cursor>"). `foot --check-config` now passes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+18
-11
@@ -120,14 +120,17 @@ in
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
keybindings = lib.mkMerge [
|
# NB: this whole set is wrapped in mkOptionDefault so it MERGES with the
|
||||||
# Bind the launcher to Mod+Space. This deliberately replaces the default
|
# home-manager module's default keybindings (same priority) rather than
|
||||||
# Mod+Space (focus mode_toggle); a bare attrset (normal priority) wins
|
# replacing them. Do not wrap it in mkMerge with a normal-priority attr --
|
||||||
# over the module default, whereas the mkOptionDefault block below would
|
# that makes the normal-priority def win and silently drops every default
|
||||||
# only tie with it. Mod+d still runs the launcher too (module default).
|
# bind (terminal, movement, workspaces, ...).
|
||||||
{ "${modifier}+space" = "exec ${menu}"; }
|
keybindings = lib.mkOptionDefault (
|
||||||
(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";
|
"${modifier}+l" = "exec ${pkgs.swaylock}/bin/swaylock -f";
|
||||||
"Print" = "exec ${pkgs.grim}/bin/grim ~/screenshot-$(date +%F-%H%M%S).png";
|
"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%+";
|
"XF86AudioRaiseVolume" = "exec ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+";
|
||||||
@@ -139,8 +142,7 @@ in
|
|||||||
"XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl set 5%+";
|
"XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl set 5%+";
|
||||||
"XF86MonBrightnessDown" = "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.
|
# `terminal` above still launches the same binary, now themed.
|
||||||
programs.foot = {
|
programs.foot = {
|
||||||
enable = true;
|
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
|
||||||
|
# "<text> <cursor>" (man foot.ini(5): "ff0000 00ff00" => green cursor, red
|
||||||
|
# text). Only colors-dark is needed; we never set initial-color-theme=light.
|
||||||
settings = {
|
settings = {
|
||||||
colors = {
|
"colors-dark" = {
|
||||||
background = ctp.base;
|
background = ctp.base;
|
||||||
foreground = ctp.text;
|
foreground = ctp.text;
|
||||||
regular0 = ctp.surface1;
|
regular0 = ctp.surface1;
|
||||||
@@ -170,8 +177,8 @@ in
|
|||||||
bright7 = ctp.subtext0;
|
bright7 = ctp.subtext0;
|
||||||
"selection-foreground" = ctp.base;
|
"selection-foreground" = ctp.base;
|
||||||
"selection-background" = ctp.rosewater;
|
"selection-background" = ctp.rosewater;
|
||||||
|
cursor = "${ctp.base} ${ctp.rosewater}";
|
||||||
};
|
};
|
||||||
cursor.color = "${ctp.base} ${ctp.rosewater}";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user