Skip to content

Commit

Permalink
refactor: move displays.conf to prependConfig hyprland
Browse files Browse the repository at this point in the history
  • Loading branch information
khaneliman committed Dec 4, 2023
1 parent 49dfec9 commit 2d4fe16
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 35 deletions.
25 changes: 24 additions & 1 deletion homes/x86_64-linux/khaneliman@khanelinix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
, ...
}:
let
inherit (lib) getExe;
inherit (lib.internal) enabled;
in
{
Expand Down Expand Up @@ -47,7 +48,29 @@ in
};
};

hyprland = enabled;
hyprland = {
enable = true;

prependConfig = /* bash */ ''
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=DP-3, 3840x2160@60, 1420x0, 2
monitor=DP-1, 5120x1440@120, 0x1080, 1
${getExe pkgs.xorg.xrandr} \
--output XWAYLAND0 --primary --mode 1920x1080 --pos 1420x0 --rotate normal \
--output XWAYLAND1 --mode 5120x1440 --pos 0x1080 --rotate normal
workspace = 1, monitor:DP-3, persistent:true
workspace = 2, monitor:DP-1, persistent:true, default:true
workspace = 3, monitor:DP-1, persistent:true
workspace = 4, monitor:DP-1, persistent:true
workspace = 5, monitor:DP-1, persistent:true
workspace = 6, monitor:DP-1, persistent:true
workspace = 7, monitor:DP-1, persistent:true
workspace = 8, monitor:DP-1, persistent:true
workspace = 9, monitor:DP-1, persistent:true
'';
};
};

security = {
Expand Down
1 change: 0 additions & 1 deletion modules/home/desktop/hyprland/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ in
extraConfig = /* bash */ ''
${cfg.prependConfig}
source=~/.config/hypr/displays.conf
source=~/.config/hypr/polish.conf
env = XDG_DATA_DIRS,'${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}':$XDG_DATA_DIRS
Expand Down
16 changes: 0 additions & 16 deletions systems/x86_64-linux/khanelinix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,6 @@ in
desktop = {
hyprland = {
enable = true;

customConfigFiles = {
"hypr/displays.conf".source = ./hypr/displays.conf;
};

customFiles = {
".screenlayout/primary.sh".source = pkgs.writeShellApplication {
name = "khanelinix-xorg-primary.sh";
checkPhase = "";
text = /* bash */ ''
${getExe pkgs.xorg.xrandr} \
--output XWAYLAND0 --primary --mode 1920x1080 --pos 1420x0 --rotate normal \
--output XWAYLAND1 --mode 5120x1440 --pos 0x1080 --rotate normal
'';
};
};
};
};

Expand Down
17 changes: 0 additions & 17 deletions systems/x86_64-linux/khanelinix/hypr/displays.conf

This file was deleted.

0 comments on commit 2d4fe16

Please sign in to comment.