From 332cac2dcb9396820472bdd3cd251bf2bce08d2a Mon Sep 17 00:00:00 2001 From: Adrian G L Date: Mon, 30 Sep 2024 12:01:48 +0200 Subject: [PATCH] no us layout sway --- home/assets/layouts/layout.xkb | 0 home/assets/layouts/usno.xkb | 0 home/sway.nix | 16 +++++++++++----- profiles/desktop.nix | 5 +++-- 4 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 home/assets/layouts/layout.xkb create mode 100644 home/assets/layouts/usno.xkb diff --git a/home/assets/layouts/layout.xkb b/home/assets/layouts/layout.xkb new file mode 100644 index 0000000..e69de29 diff --git a/home/assets/layouts/usno.xkb b/home/assets/layouts/usno.xkb new file mode 100644 index 0000000..e69de29 diff --git a/home/sway.nix b/home/sway.nix index 4ad3ba5..2a4b075 100644 --- a/home/sway.nix +++ b/home/sway.nix @@ -29,6 +29,7 @@ in qt6Packages.qt6ct pass-wayland wev + xkb-switch #term foot @@ -52,7 +53,6 @@ in mako #lockscreen and related - wleave swayidle #swaylock-effects #swaylock-fancy #migth change to this default may look prettier. @@ -95,6 +95,8 @@ in ]; + home.keyboard.layout = "us,no"; + home.sessionVariables = { MOZ_ENABLE_WAYLAND = "1"; MOZ_USE_XINPUT2 = "1"; @@ -120,7 +122,9 @@ in }; - + programs.wlogout = { + enable = true; + }; wayland.windowManager.sway = let cfg = config.wayland.windowManager.sway; @@ -258,7 +262,7 @@ in { "${cfg.config.modifier}+f11" = "exec grim -g \"$(slurp)\" ~/Pictures/screenshots/\"screenshot-`date +%F-%T`\".png"; "${cfg.config.modifier}+Print" = "exec grim -g \"$(slurp)\" ~/Pictures/screenshots/\"screenshot-`date +%F-%T`\".png"; "${cfg.config.modifier}+m" = "exec ${idlelock}"; - "ctrl+space" = "exec xkb_switch_layout next"; #TODO:verify + #"ctrl+space" = "exec xkb_switch_layout next"; #TODO:verify "${cfg.config.modifier}+tab" = "workspace next"; "Alt+tab" = "workspace back_and_forth"; }; @@ -269,8 +273,10 @@ in { xkb_capslock disabled xkb_numlock enabled - xkb_layout us,no - xkb_options : + xkb_layout no,us + xkb_options winkeys, + xkb_options grp:ctrl_space_toggle + xkb_numlock enabled # enable numlock when logging in } diff --git a/profiles/desktop.nix b/profiles/desktop.nix index 08a6704..e1574f4 100644 --- a/profiles/desktop.nix +++ b/profiles/desktop.nix @@ -84,8 +84,9 @@ imports = # Configure keymap in X11 services.xserver.xkb = { - layout = "us,no"; - variant = ","; + layout = "no,us"; + variant = ""; + };