From 493ef5ae02f75e7d79568a7668b041413c6926f1 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Tue, 15 Oct 2024 03:08:33 +0300 Subject: [PATCH] Keyd: Disable some keys in Gimp and games. --- home/config/keyd/module/Disable.nix | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/home/config/keyd/module/Disable.nix b/home/config/keyd/module/Disable.nix index 5239709..59cdb4f 100644 --- a/home/config/keyd/module/Disable.nix +++ b/home/config/keyd/module/Disable.nix @@ -1,19 +1,27 @@ { pkgs, ... }: let - disable = [ + apps = [ + "gimp-*" + "steam-proton" + ]; + + keys = [ + "escape" + "leftcontrol" ]; in { file = (pkgs.formats.ini { }).generate "KeydDisableConfig" ( - builtins.listToAttrs (builtins.map (app: - { + builtins.listToAttrs ( + builtins.map (app: { name = app; - value = { - "capslock" = "capslock"; - "escape" = "escape"; - "leftcontrol" = "leftcontrol"; - }; - } - ) disable) + value = builtins.listToAttrs ( + builtins.map (key: { + name = key; + value = key; + }) keys + ); + }) apps + ) ); }