From a6d01825596ce05fc49af6a7f29367c2570d5c4a Mon Sep 17 00:00:00 2001 From: get Date: Fri, 12 Apr 2024 19:30:10 +0200 Subject: [PATCH] Optimized hyprland config --- hosts/lars/dyonisos/configuration.nix | 4 ++++ hosts/lars/hyprland.nix | 24 ++++++++++++++++++------ hosts/lars/kronos/configuration.nix | 4 ++++ hosts/lars/programs.nix | 3 +++ 4 files changed, 29 insertions(+), 6 deletions(-) diff --git a/hosts/lars/dyonisos/configuration.nix b/hosts/lars/dyonisos/configuration.nix index a702148..1bc5392 100644 --- a/hosts/lars/dyonisos/configuration.nix +++ b/hosts/lars/dyonisos/configuration.nix @@ -7,5 +7,9 @@ username = "lars"; }; }; + hyprland = { + enable = true; + monitor = ",preferred,auto,1"; + }; }; } diff --git a/hosts/lars/hyprland.nix b/hosts/lars/hyprland.nix index 24afae1..1404c6d 100644 --- a/hosts/lars/hyprland.nix +++ b/hosts/lars/hyprland.nix @@ -4,7 +4,14 @@ with lib; let cfg = config.myOptions.hyprland; in { options.myOptions.hyprland.nvidia.enable = mkEnableOption "nvidia"; - options.myOptions.hyprland.enable = mkEnableOption "hyprland"; + options.myOptions.hyprland = { + enable = mkEnableOption "hyprland"; + monitor = mkOption { + description = "hyprland monitor config"; + default = ",preferred,auto,1"; + type = types.listof(types.str); + }; + }; config = mkIf cfg.enable { environment.sessionVariables = mkIf cfg.nvidia.enable { @@ -36,11 +43,6 @@ in { settings = { "$mod" = "SUPER"; - monitor = [ - "DP-2,2560x1440@144,0x0,1" - "DP-1,1920x1080@60,2560x0,1" - ]; - input = { kb_layout = "ch"; }; @@ -53,6 +55,16 @@ in { # Monitor management "$mod SHIFT, k, movecurrentworkspacetomonitor, DP-2" "$mod SHIFT, j, movecurrentworkspacetomonitor, DP-1" + + # Window Management + "$mod, left, movefocus, l" + "$mod, right, movefocus, r" + "$mod, up, movefocus, u" + "$mod, down, movefocus, d" + "$mod, F, fullscreen" + + # Screenshot + "$mod SHIFT, s, exec, grim -g 'slurp -d' - | wl-copy" ] ++ ( builtins.concatLists (builtins.genList ( diff --git a/hosts/lars/kronos/configuration.nix b/hosts/lars/kronos/configuration.nix index 5d796f5..3cc0d21 100644 --- a/hosts/lars/kronos/configuration.nix +++ b/hosts/lars/kronos/configuration.nix @@ -10,6 +10,10 @@ hyprland = { enable = true; nvidia.enable = true; + monitor = [ + "DP-2,2560x1440@144,0x0,1" + "DP-1,1920x1080@60,2560x0,1" + ]; }; }; diff --git a/hosts/lars/programs.nix b/hosts/lars/programs.nix index 97a5b03..46cac30 100644 --- a/hosts/lars/programs.nix +++ b/hosts/lars/programs.nix @@ -48,6 +48,9 @@ in { tmux firefox kitty + grim + slurp + wl-clipboard ]; }; }