Switch xremap to user mode

system mode didn't work for executing applications
This commit is contained in:
GHOSCHT 2024-02-16 12:32:19 +01:00
parent a839540671
commit 190081b246
Signed by: ghoscht
GPG key ID: 2C2C1C62A5388E82

View file

@ -17,26 +17,47 @@
path = [pkgs.xorg.xhost]; path = [pkgs.xorg.xhost];
wantedBy = ["default.target"]; wantedBy = ["default.target"];
script = "xhost +SI:localuser:root"; script = "xhost +SI:localuser:root";
environment.DISPLAY = "DP-4"; # NOTE: This is hardcoded for this flake environment.DISPLAY = ":0"; # NOTE: This is hardcoded for this flake
}; };
services.xremap = { services.xremap = {
withX11 = true; withX11 = true;
watch = true; watch = true;
# debug = true; debug = false;
userName = "ghoscht"; userName = "ghoscht";
serviceMode = "system"; serviceMode = "user";
config = { config = {
keymap = [ keymap = [
{ {
name = "Global"; name = "Global";
remap = {"CapsLock" = "Esc";}; # globally remap CapsLock to Esc remap = {
"CapsLock" = "Esc";
"Esc" = "CapsLock";
super-x = {
launch = ["${lib.getExe pkgs.wezterm}"];
};
# super-space = {
# launch = ["${lib.getExe pkgs.rofi}" "-i" "-show" "drun" "-show-icons"];
# };
# super-control-l = {
# launch = ["${lib.getExe pkgs.firefox}"];
# };
# super-control-shift-l = {
# launch = ["${lib.getExe pkgs.firefox}" "--private-window"];
# };
};
} }
{ {
name = "main remaps"; name = "Music";
remap = { remap = {
super-e = { "KEY_PLAYPAUSE" = {
launch = ["${lib.getExe pkgs.pavucontrol}"]; launch = ["${lib.getExe pkgs.playerctl}" "play-pause"];
};
"KEY_NEXTSONG" = {
launch = ["${lib.getExe pkgs.playerctl}" "next"];
};
"KEY_PREVIOUSSONG" = {
launch = ["${lib.getExe pkgs.playerctl}" "previous"];
}; };
}; };
} }