From 1e99a598e3026a4907949bf9a619a7d7a2409340 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Sat, 9 Dec 2023 22:40:01 +0100 Subject: [PATCH] disable caps-lock on gnome --- profiles/locale-no.nix | 9 --------- users/pbsds/home/profiles/gnome/dconf-gnome-bindings.nix | 5 +++++ users/pbsds/home/profiles/gnome/dconf-pull.sh | 1 + 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/profiles/locale-no.nix b/profiles/locale-no.nix index c393eff..517eb0a 100644 --- a/profiles/locale-no.nix +++ b/profiles/locale-no.nix @@ -14,13 +14,4 @@ console.keyMap = "no"; services.xserver.layout = "no"; services.xserver.xkbVariant = ""; - - # no caps lock - services.xserver.xkbOptions = "ctrl:nocaps"; # TODO: doesn't work - #console.useXkbConfig = true; # applies to ttys aswell, mutex with console.keyMap - # run the following to make GNOME reload the xkb options: - /* - gsettings reset org.gnome.desktop.input-sources xkb-options - gsettings reset org.gnome.desktop.input-sources sources - */ } diff --git a/users/pbsds/home/profiles/gnome/dconf-gnome-bindings.nix b/users/pbsds/home/profiles/gnome/dconf-gnome-bindings.nix index b131870..50a74ae 100644 --- a/users/pbsds/home/profiles/gnome/dconf-gnome-bindings.nix +++ b/users/pbsds/home/profiles/gnome/dconf-gnome-bindings.nix @@ -5,6 +5,11 @@ with lib.hm.gvariant; { dconf.settings = { + "org/gnome/desktop/input-sources" = { + sources = [ (mkTuple [ "xkb" "no" ]) ]; + xkb-options = [ "terminate:ctrl_alt_bksp" "caps:none" ]; + }; + "org/gnome/desktop/wm/keybindings" = { close = [ "F4" ]; maximize = [ "Up" ]; diff --git a/users/pbsds/home/profiles/gnome/dconf-pull.sh b/users/pbsds/home/profiles/gnome/dconf-pull.sh index 36200b8..0709a0a 100755 --- a/users/pbsds/home/profiles/gnome/dconf-pull.sh +++ b/users/pbsds/home/profiles/gnome/dconf-pull.sh @@ -15,6 +15,7 @@ dump1() { } { + dump "org/gnome/desktop/input-sources" dump "org/gnome/desktop/wm/keybindings" dump "org/gnome/mutter/keybindings" dump "org/gnome/shell/keybindings"