1
0

xmodmap on hotplug

This commit is contained in:
dump_stack() 2023-02-13 09:08:11 +00:00
parent 05d68776e7
commit 3b4a2168bc
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC

View File

@ -17,6 +17,25 @@ in {
windowManager.xmonad.enable = true; windowManager.xmonad.enable = true;
}; };
systemd.user.services.xmodmap = {
description = "xmodmap hotplug";
wantedBy = [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ];
unitConfig = {
StartLimitIntervalSec = 0;
};
serviceConfig = {
PassEnvironment = "DISPLAY";
Restart = "always";
RestartSec = 0;
};
script = ''
${pkgs.inotify-tools}/bin/inotifywait -e create /dev/input
sleep 1s
${pkgs.xorg.xmodmap}/bin/xmodmap -e 'add mod3 = Muhenkan'
'';
};
#services.xserver.videoDrivers = [ "nvidia" ]; #services.xserver.videoDrivers = [ "nvidia" ];
services.xserver.xautolock = { services.xserver.xautolock = {