Skip to content

Commit

Permalink
Attemp to fix the unstable xremap daemon (#779)
Browse files Browse the repository at this point in the history
* Introduce xremap-gnome

* Enable debug logging in xremap

For a preparation part for GH-773

* Manually install xremap-gnome extension

* Disable xremap debug logging for now
  • Loading branch information
kachick authored Sep 9, 2024
1 parent bdd6679 commit 5cafcfa
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 24 deletions.
1 change: 1 addition & 0 deletions home-manager/gnome.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ in
just-perfection
dash-to-dock
# color-picker # Don't enable by default. It conflicts with clipboard-history
xremap
]
);

Expand Down
1 change: 1 addition & 0 deletions nixos/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@
just-perfection
dash-to-dock
color-picker
xremap
]);

# https://github.com/NixOS/nixpkgs/issues/33282#issuecomment-523572259
Expand Down
59 changes: 35 additions & 24 deletions nixos/xremap.nix
Original file line number Diff line number Diff line change
@@ -1,30 +1,41 @@
{
# Modmap for single key rebinds
services.xremap.config = {
modmap = [
{
name = "Global";
remap = {
"CapsLock" = "Ctrl_L";
"Alt_L" = {
"held" = "Alt_L";
"alone" = "Muhenkan";
"alone_timeout_millis" = 500;
services.xremap = {
enable = true;
# https://github.com/xremap/xremap-gnome
# https://github.com/xremap/nix-flake/blob/3717cb0539f4967010ba540baa439a4cf6ea8576/lib/default.nix#L64-L65
withGnome = true;

# Enable when you investigate GH-773
# You can check the logs with `journalctl -f`
debug = false;

config = {
modmap = [
{
name = "Global";
remap = {
"CapsLock" = "Ctrl_L";
"Alt_L" = {
"held" = "Alt_L";
"alone" = "Muhenkan";
"alone_timeout_millis" = 500;
};
"Alt_R" = "Henkan";
};
"Alt_R" = "Henkan";
};
}
];
}
];

# Disabled while using Alt-Space for pop-shell launcher
# Keymap for key combo rebinds
# keymap = [
# {
# name = "Gnome lancher";
# remap = {
# "Alt-Space" = "LEFTMETA";
# };
# }
# ];
# Disabled while using Alt-Space for pop-shell launcher
# Keymap for key combo rebinds
# keymap = [
# {
# name = "Gnome lancher";
# remap = {
# "Alt-Space" = "LEFTMETA";
# };
# }
# ];
};
};
}

0 comments on commit 5cafcfa

Please sign in to comment.