From a77b87553d4edf648dc7a262cf1d2e860bfb0326 Mon Sep 17 00:00:00 2001 From: muon Date: Thu, 25 Sep 2025 10:55:26 +0000 Subject: [PATCH] Add some hyprland changes --- hosts/murk/configuration.nix | 6 +-- hosts/murk/home.nix | 1 + modules/home/desktop/hyprland.nix | 66 ++++++++++++++++++++----------- 3 files changed, 45 insertions(+), 28 deletions(-) diff --git a/hosts/murk/configuration.nix b/hosts/murk/configuration.nix index 00e5f56..05610ba 100644 --- a/hosts/murk/configuration.nix +++ b/hosts/murk/configuration.nix @@ -35,6 +35,7 @@ in { pkgs.piper pkgs.libpq pkgs.qmk + pkgs.jq ]; # System @@ -54,15 +55,12 @@ in { mods.theme.wallpaper = ./wallpaper.png; services.xserver.windowManager.i3.enable = true; + # mods.desktop.wayland.enable = true; mods.impermanence.enable = true; - services.hardware.openrgb.enable = true; virtualisation.docker.enable = true; - services.picom.enable = true; - services.picom.opacityRules = ["50:name *= 'Cheat'"]; - users.users.muon.openssh.authorizedKeys.keys = keys; users.users.root.openssh.authorizedKeys.keys = keys; diff --git a/hosts/murk/home.nix b/hosts/murk/home.nix index a891f58..c77adbf 100644 --- a/hosts/murk/home.nix +++ b/hosts/murk/home.nix @@ -13,6 +13,7 @@ in { # Modules mods.xdg.enable = true; mods.i3.enable = true; + # mods.hyprland.enable = true; mods.battery.enable = true; mods.terminal.zsh.enable = true; mods.terminal.emulator.enable = true; diff --git a/modules/home/desktop/hyprland.nix b/modules/home/desktop/hyprland.nix index 4a41db2..5e445f7 100644 --- a/modules/home/desktop/hyprland.nix +++ b/modules/home/desktop/hyprland.nix @@ -1,4 +1,10 @@ -{ pkgs, lib, config, ... }: { +{ + pkgs, + lib, + config, + osConfig, + ... +}: { options.mods.hyprland.enable = lib.mkEnableOption { description = "enables hyprland"; default = false; @@ -22,32 +28,44 @@ }; "$mod" = "SUPER"; - bind = [ - "$mod, Return, exec, alacritty" - "$mod, D, exec, fuzzel" - "$mod, F, exec, qutebrowser" + bind = + [ + "$mod, Return, exec, alacritty" + "$mod, D, exec, fuzzel" + "$mod, B, exec, qutebrowser" - "$mod SHIFT, Q, killactive," - "$mod SHIFT, X, exit," + "$mod SHIFT, Q, killactive," + "$mod SHIFT, X, exit," - "$mod, H, movefocus, l" - "$mod, J, movefocus, d" - "$mod, K, movefocus, u" - "$mod, L, movefocus, r" - ] - ++ (builtins.concatLists (builtins.genList ( - # workspaces - # binds $mod + [shift +] {1..10} to [move to] workspace {1..10} - x: let - ws = let - c = (x + 1) / 10; - in - builtins.toString (x + 1 - (c * 10)); - in [ - "$mod, ${ws}, workspace, ${toString (x + 1)}" - "$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}" + "$mod, H, movefocus, l" + "$mod, J, movefocus, d" + "$mod, K, movefocus, u" + "$mod, L, movefocus, r" + + "$mod SHIFT, H, movewindow, l" + "$mod SHIFT, J, movewindow, d" + "$mod SHIFT, K, movewindow, u" + "$mod SHIFT, L, movewindow, r" ] - ) 10) ); + ++ (builtins.concatLists (builtins.genList ( + # workspaces + # binds $mod + [shift +] {1..10} to [move to] workspace {1..10} + x: let + ws = let + c = (x + 1) / 10; + in + builtins.toString (x + 1 - (c * 10)); + in [ + "$mod, ${ws}, workspace, ${toString (x + 1)}" + "$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}" + ] + ) + 10)); + + monitor = + lib.mapAttrsToList + (_: v: "${v.name},${v.config.mode}@${v.config.rate},${v.config.position},1") + osConfig.mods.monitors; }; }; };