From af00015d69b1121deb491787c89274b73bbcae98 Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Mon, 27 Oct 2025 15:33:38 +0100 Subject: [PATCH] adjust gnome window management keymap --- config/projects.nix | 12 ++++++------ modules/gnome.nix | 28 ++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/config/projects.nix b/config/projects.nix index f01c40b..a29e58b 100644 --- a/config/projects.nix +++ b/config/projects.nix @@ -74,15 +74,15 @@ in description = "AI for Material"; windows = [ { - name = "agent"; - path = homePath "Documents/Projects/Material AI Agent"; + name = "code"; + path = homePath "Documents/Projects/Material AI Agent/code"; ai = true; - git = false; - shell = false; + git = true; + shell = true; } { - name = "mds"; - path = homePath "Documents/Projects/Material Design Shortcut"; + name = ""; + path = homePath "Documents/Projects/Material AI Agent"; ai = true; git = false; shell = false; diff --git a/modules/gnome.nix b/modules/gnome.nix index 14f4351..9f3ea3f 100644 --- a/modules/gnome.nix +++ b/modules/gnome.nix @@ -39,6 +39,7 @@ in enabled-extensions = [ "hidetopbar@mathieu.bidon.ca" "pano@elhan.io" + "tiling-assistant@leleat-on-github" ]; favorite-apps = [ "org.gnome.Nautilus.desktop" @@ -102,6 +103,32 @@ in "com/github/libpinyin/ibus-libpinyin/libpinyin" = { lookup-table-page-size = 7; # Number of candidates displayed (default: 5) }; + + # Window tiling keybindings - vim-style with Super+HJKL + "org/gnome/mutter/keybindings" = { + toggle-tiled-left = [ "h" ]; # Tile left: Super+H or Super+Left + toggle-tiled-right = [ "l" ]; # Tile right: Super+L or Super+Right + }; + + "org/gnome/desktop/wm/keybindings" = { + maximize = [ "k" ]; # Maximize: Super+K or Super+Up + unmaximize = [ "j" ]; # Unmaximize: Super+J or Super+Down + minimize = [ "m" ]; # Minimize: Super+M (was Super+H) + }; + + # Lock screen keybinding - moved from Super+L to Super+Escape to avoid conflict + "org/gnome/settings-daemon/plugins/media-keys" = { + screensaver = [ "Escape" ]; # Lock screen: Super+Escape (was Super+L) + }; + + # Tiling Assistant - quarter corner tiling keybindings + # Mapped to R/T/F/G keys to mirror their physical positions on keyboard + "org/gnome/shell/extensions/tiling-assistant" = { + tile-topleft-quarter = [ "r" ]; # Top-left: Super+R + tile-topright-quarter = [ "t" ]; # Top-right: Super+T + tile-bottomleft-quarter = [ "f" ]; # Bottom-left: Super+F + tile-bottomright-quarter = [ "g" ]; # Bottom-right: Super+G + }; }; # IBus Mozc (Japanese) configuration - default to Hiragana input mode @@ -159,6 +186,7 @@ in home.packages = with pkgs; [ gnomeExtensions.hide-top-bar gnomeExtensions.pano + gnomeExtensions.tiling-assistant ]; # Custom desktop file for opening text files with Neovim in Ghostty