fix gnome tiling keymapping
This commit is contained in:
parent
ebf51040e1
commit
0298c1429e
2 changed files with 44 additions and 21 deletions
|
|
@ -4,6 +4,10 @@ with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.desktop-custom;
|
cfg = config.desktop-custom;
|
||||||
|
# Import gvariant for dconf types
|
||||||
|
mkTuple = lib.gvariant.mkTuple;
|
||||||
|
mkUint32 = lib.gvariant.mkUint32;
|
||||||
|
mkEmptyArray = lib.gvariant.mkEmptyArray;
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
@ -80,5 +84,42 @@ in
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
hicolor-icon-theme # Fallback icon theme
|
hicolor-icon-theme # Fallback icon theme
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# System-level dconf configuration with lockAll to prevent overrides
|
||||||
|
# This ensures keybindings persist after suspend/resume
|
||||||
|
programs.dconf = {
|
||||||
|
enable = true;
|
||||||
|
profiles.user.databases = [{
|
||||||
|
lockAll = true; # Prevents GNOME and extensions from changing these settings
|
||||||
|
settings = {
|
||||||
|
# Mutter keybindings - window tiling (vim-style hjkl)
|
||||||
|
"org/gnome/mutter/keybindings" = {
|
||||||
|
toggle-tiled-left = [ "<Super>h" ]; # Tile left: Super+h
|
||||||
|
toggle-tiled-right = [ "<Super>l" ]; # Tile right: Super+l
|
||||||
|
};
|
||||||
|
|
||||||
|
# Window manager keybindings (vim-style hjkl)
|
||||||
|
"org/gnome/desktop/wm/keybindings" = {
|
||||||
|
# Window maximize/restore
|
||||||
|
maximize = [ "<Super>k" ]; # Maximize: Super+k
|
||||||
|
unmaximize = [ "<Super>j" ]; # Restore: Super+j
|
||||||
|
|
||||||
|
# Move window between monitors
|
||||||
|
move-to-monitor-left = [ "<Super><Shift>h" ]; # Move left: Super+Shift+h
|
||||||
|
move-to-monitor-right = [ "<Super><Shift>l" ]; # Move right: Super+Shift+l
|
||||||
|
move-to-monitor-up = [ "<Super><Shift>k" ]; # Move up: Super+Shift+k
|
||||||
|
move-to-monitor-down = [ "<Super><Shift>j" ]; # Move down: Super+Shift+j
|
||||||
|
|
||||||
|
# Disable conflicting keybindings
|
||||||
|
minimize = mkEmptyArray "s"; # Disable Super+h conflict (was minimize window)
|
||||||
|
};
|
||||||
|
|
||||||
|
# Disable screen lock on Super+L to free it for tiling right
|
||||||
|
"org/gnome/settings-daemon/plugins/media-keys" = {
|
||||||
|
screensaver = mkEmptyArray "s"; # Remove Super+L screen lock binding
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -120,27 +120,9 @@ in
|
||||||
tile-bottomright-quarter = [ "<Super>g" ]; # Bottom-right: Super+G
|
tile-bottomright-quarter = [ "<Super>g" ]; # Bottom-right: Super+G
|
||||||
};
|
};
|
||||||
|
|
||||||
# Mutter keybindings - window tiling (vim-style hjkl)
|
# NOTE: vim-style hjkl keybindings (Super+h/j/k/l) are configured at the
|
||||||
"org/gnome/mutter/keybindings" = {
|
# system level in desktop.nix with lockAll = true to prevent them from
|
||||||
toggle-tiled-left = [ "<Super>h" ]; # Tile left: Super+h (replaces Super+Left)
|
# being overridden after suspend/resume or by GNOME extensions
|
||||||
toggle-tiled-right = [ "<Super>l" ]; # Tile right: Super+l (replaces Super+Right)
|
|
||||||
};
|
|
||||||
|
|
||||||
# Window manager keybindings (vim-style hjkl)
|
|
||||||
"org/gnome/desktop/wm/keybindings" = {
|
|
||||||
# Window maximize/restore
|
|
||||||
maximize = [ "<Super>k" ]; # Maximize: Super+k (replaces Super+Up)
|
|
||||||
unmaximize = [ "<Super>j" ]; # Restore: Super+j (replaces Super+Down)
|
|
||||||
|
|
||||||
# Move window between monitors
|
|
||||||
move-to-monitor-left = [ "<Super><Shift>h" ]; # Move left: Super+Shift+h
|
|
||||||
move-to-monitor-right = [ "<Super><Shift>l" ]; # Move right: Super+Shift+l
|
|
||||||
move-to-monitor-up = [ "<Super><Shift>k" ]; # Move up: Super+Shift+k
|
|
||||||
move-to-monitor-down = [ "<Super><Shift>j" ]; # Move down: Super+Shift+j
|
|
||||||
|
|
||||||
# Disable conflicting keybindings
|
|
||||||
minimize = []; # Disable Super+h conflict
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue