From fb1083dc46509d8d6f64a8ff5bd374ab6487ded3 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Sun, 22 Sep 2024 15:52:29 -0400 Subject: [PATCH] hpyrland: improve master layout settings and binds --- homeManagerModules/desktop/hyprland/README.md | 3 ++- .../desktop/hyprland/settings.nix | 24 ++++++++----------- hosts/mauville/home.nix | 1 - 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/homeManagerModules/desktop/hyprland/README.md b/homeManagerModules/desktop/hyprland/README.md index 81c5e71d..923c03f1 100644 --- a/homeManagerModules/desktop/hyprland/README.md +++ b/homeManagerModules/desktop/hyprland/README.md @@ -73,8 +73,9 @@ ______________________________________________________________________ - SUPER + F11: Show/hide top panel. - SUPER + TAB: Open Window list. - SUPER + V: Toggle floating window. -- SUPER SHIFT + Backslash: Toggle vertical/horizontal splits. +- SUPER SHIFT + Backslash: Toggle vertical/horizontal splits (dwindle layout only). - SUPER SHIFT + G: Toggle groupbar. +- SUPER SHIFT + M: Swap window for master (master layout only). - SUPER SHIFT + W: Toggle fullscreen. #### Focus diff --git a/homeManagerModules/desktop/hyprland/settings.nix b/homeManagerModules/desktop/hyprland/settings.nix index 0cdd7174..32d0f020 100644 --- a/homeManagerModules/desktop/hyprland/settings.nix +++ b/homeManagerModules/desktop/hyprland/settings.nix @@ -27,37 +27,38 @@ in { bind = [ + ''$mod,M,exec,${lib.getExe config.programs.rofi.package} -show power-menu -modi "power-menu:${lib.getExe pkgs.rofi-power-menu} --choices=logout/lockscreen/suspend/shutdown/reboot"'' + ",PRINT,exec,${helpers.screenshot}" "$mod CTRL,L,exec,${lib.getExe pkgs.swaylock}" + "$mod SHIFT,backslash,togglesplit" + "$mod SHIFT,comma,exec,${lib.getExe pkgs.hyprnome} --previous --move" "$mod SHIFT,G,togglegroup" + "$mod SHIFT,M,layoutmsg,swapwithmaster master" + "$mod SHIFT,period,exec,${lib.getExe pkgs.hyprnome} --move" "$mod SHIFT,R,exec,${lib.getExe config.programs.rofi.package} -show run" "$mod SHIFT,S,movetoworkspace,special:magic" "$mod SHIFT,V,togglefloating" "$mod SHIFT,W,fullscreen" - "$mod SHIFT,backslash,togglesplit" - "$mod SHIFT,comma,exec,${lib.getExe pkgs.hyprnome} --previous --move" - "$mod SHIFT,period,exec,${lib.getExe pkgs.hyprnome} --move" "$mod,B,exec,${lib.getExe cfg.defaultApps.webBrowser}" "$mod,C,killactive" + "$mod,comma,exec,${lib.getExe pkgs.hyprnome} --previous" "$mod,E,exec,${lib.getExe cfg.defaultApps.editor}" "$mod,F,exec,${lib.getExe cfg.defaultApps.fileManager}" "$mod,F11,exec,pkill -SIGUSR1 waybar" "$mod,H,changegroupactive,b" "$mod,L,changegroupactive,f" "$mod,Left,changegroupactive,b" + "$mod,mouse_down,workspace,+1" + "$mod,mouse_up,workspace,-1" + "$mod,period,exec,${lib.getExe pkgs.hyprnome}" "$mod,R,exec,${lib.getExe config.programs.rofi.package} -show combi" "$mod,Right,changegroupactive,f" "$mod,S,togglespecialworkspace,magic" "$mod,T,exec,${lib.getExe cfg.defaultApps.terminal}" "$mod,Tab,exec,${lib.getExe config.programs.rofi.package} -show window" - "$mod,comma,exec,${lib.getExe pkgs.hyprnome} --previous" - "$mod,mouse_down,workspace,+1" - "$mod,mouse_up,workspace,-1" - "$mod,period,exec,${lib.getExe pkgs.hyprnome}" - ",PRINT,exec,${helpers.screenshot}" "CTRL ALT,M,submap,move" "CTRL ALT,R,submap,resize" "CTRL,F12,exec,${helpers.screenshot}" - ''$mod,M,exec,${lib.getExe config.programs.rofi.package} -show power-menu -modi "power-menu:${lib.getExe pkgs.rofi-power-menu} --choices=logout/lockscreen/suspend/shutdown/reboot"'' ] ++ builtins.map (x: "$mod SHIFT,${toString x},movetoworkspace,${toString x}") [1 2 3 4 5 6 7 8 9] ++ builtins.map (x: "$mod,${toString x},workspace,${toString x}") [1 2 3 4 5 6 7 8 9] @@ -168,11 +169,6 @@ in { }; }; - master = { - always_center_master = true; - new_status = false; - }; - misc = { disable_hyprland_logo = true; disable_splash_rendering = true; diff --git a/hosts/mauville/home.nix b/hosts/mauville/home.nix index 24f6970a..d022fd91 100644 --- a/hosts/mauville/home.nix +++ b/hosts/mauville/home.nix @@ -89,7 +89,6 @@ }; wayland.windowManager.hyprland.settings = { - bind = ["$mod SHIFT,M,layoutmsg,swapwithmaster master"]; general.layout = lib.mkForce "master"; master = {