chore: found a better 'nix' way to create conf file

This commit is contained in:
Yorick Barbanneau 2024-05-07 23:34:50 +02:00
parent 98f0144732
commit 0e3faccc53

View file

@ -1,19 +1,22 @@
{pkgs, ... }: {pkgs, ... }:
{ let
home.file.".xkb/symbols/gpdwinmax".text = '' kbd_file = pkgs.writeText "gpdwinmax.kbd"
default partial alphanumeric_keys ''
xkb_symbols "us-intl-winmax" { default partial alphanumeric_keys
name[group1] = "GPD Win Max us-inlt"; xkb_symbols "us-intl-winmax" {
include "us(altgr-intl)" name[group1] = "GPD Win Max us-inlt";
key <TAB> { [ Multi_key ] }; include "us(altgr-intl)"
key <CAPS> { [ Tab ] }; key <TAB> { [ Multi_key ] };
# include "level3(ralt_switch)" key <CAPS> { [ Tab ] };
}; # include "level3(ralt_switch)"
};
''; '';
in
{
wayland.windowManager.sway.checkConfig = false;
wayland.windowManager.sway.config.input = { wayland.windowManager.sway.config.input = {
"1:1:AT_Translated_Set_2_keyboard" = { "1:1:AT_Translated_Set_2_keyboard" = {
xkb_layout = "gpdwinmax"; xkb_layout = "${kbd_file}";
}; };
"1046:928:Goodix_Capacitive_TouchScreen" = { "1046:928:Goodix_Capacitive_TouchScreen" = {
map_to_output = "eDP-1"; map_to_output = "eDP-1";