sway: sync Xwayland keyboard layout

This commit is contained in:
Leonardo Eugênio 2025-10-24 20:41:44 -03:00
parent 28850abd5b
commit 481af4f88c
4 changed files with 54 additions and 0 deletions

View file

@ -14,6 +14,7 @@ in
imports = [
./kanshi.nix
./mako.nix
./sway-sync-xkbmap.nix
./sway-binds.nix
./sway-modes.nix
./sway-assigns.nix

View file

@ -0,0 +1,27 @@
{
config,
pkgs,
lib,
...
}:
let
cfg = config.my.sway;
in
{
config = lib.mkIf cfg.enable {
systemd.user.services.sway-sync-xkbmap = {
Unit = {
Description = "Sync xkbmap with sway keyboard layout";
PartOf = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
};
Service = {
ExecStart = lib.getExe pkgs.sway-sync-xkbmap;
Restart = "on-failure";
};
Install = {
WantedBy = [ "sway-session.target" ];
};
};
};
}