From 7447cdd8896414429132d72bd734a4f70938f0c3 Mon Sep 17 00:00:00 2001 From: Nickiel12 Date: Thu, 26 Oct 2023 16:49:06 -0700 Subject: [PATCH] keeping this one for future reference --- modules/hyprland/default.nix | 34 ++++++++++++++++++++++++---------- modules/hyprland/displays.nix | 23 +++++++++++++++++++++++ 2 files changed, 47 insertions(+), 10 deletions(-) create mode 100644 modules/hyprland/displays.nix diff --git a/modules/hyprland/default.nix b/modules/hyprland/default.nix index aac61f3..127c51e 100644 --- a/modules/hyprland/default.nix +++ b/modules/hyprland/default.nix @@ -2,6 +2,11 @@ let + hostname = osConfig.networking.hostName; + + monitor_config = import ./monitors.nix { hostname = hostname; }; + workspace_config = import ./workspaces.nix { hostname = hostname; }; + in { @@ -26,21 +31,30 @@ in # Whether to enable patching wlroots for better Nvidia support enableNvidiaPatches = true; - extraConfig = if (osConfig.networking.hostName == "NicksNixDesktop") then + extraConfig = lib.strings.concatStrings [ + monitor_config + # workspace_config '' - monitor=DP-2, 2560x1440@144, 1920x0, 1 - monitor=DP-3, 1920x1080@60, 0x360,1 - env = LIBVA_DRIVER_NAME,nvidia - env = XDG_SESSION_TYPE,wayland - env = GBM_BACKEND,nvidia-drm - env = WLR_NO_HARDWARE_CURSORS,1 '' - else '' - - ''; + ]; settings = { + + workspace = [ + "1,monitor:DP-2" + "3,monitor:DP-2" + "5,monitor:DP-2" + "7,monitor:DP-2" + "9,monitor:DP-2" + + "2,monitor:DP-3" + "4,monitor:DP-3" + "6,monitor:DP-3" + "8,monitor:DP-3" + "10,monitor:DP-3" + ]; + "$mod" = "SUPER"; exec-once = [ diff --git a/modules/hyprland/displays.nix b/modules/hyprland/displays.nix new file mode 100644 index 0000000..4da97ec --- /dev/null +++ b/modules/hyprland/displays.nix @@ -0,0 +1,23 @@ +{ hostname ? "undefined" }: + +let + monitor_config = if (hostname == "NicksNixDesktop") then + '' + monitor=DP-2, 2560x1440@144, 1920x0, 1 + monitor=DP-3, 1920x1080@60, 0x360,1 + + env = LIBVA_DRIVER_NAME,nvidia + env = XDG_SESSION_TYPE,wayland + env = GBM_BACKEND,nvidia-drm + env = WLR_NO_HARDWARE_CURSORS,1 + + + '' + else if (hostname == "NicksNixLaptop") then '' + + '' else '' + + ''; + +in monitor_config +