blob: 50a179ea8cff266dc3827ec655ebefa945bc1780 [file] [log] [blame]
Skyler Greya16cb702023-03-11 19:20:06 +00001{ lib, pkgs, ... }: {
Skyler Grey81dd90e2023-03-26 10:45:11 +00002 config.boot.kernelParams = [
3 "video=eDP-1:2256x1440@60"
Skyler Grey047664c2023-04-15 14:34:48 +00004 "video=HDMI-1-1:3840x2160@76"
Skyler Grey81dd90e2023-03-26 10:45:11 +00005 ];
Skyler Greya16cb702023-03-11 19:20:06 +00006 home = {
7 services.grobi = {
8 enable = true;
9 rules = (map
10 (output: {
11 name = "Docked (${output})";
12 outputs_connected = [ output "eDP-1" ];
Skyler Grey494bba22023-04-17 08:14:02 +000013 configure_command = "xrandr --output eDP-1 --primary --mode 2256x1504 --pos 0x1454 --rotate normal --output ${output} --mode 3840x2160 --pos 2256x0 --rotate normal";
Skyler Greya16cb702023-03-11 19:20:06 +000014 atomic = true;
15 primary = "eDP-1";
16 })
Skyler Grey047664c2023-04-15 14:34:48 +000017 ([ "HDMI-A-1" "HDMI-A-1-0" "HDMI-1-1" ] ++
Skyler Greya16cb702023-03-11 19:20:06 +000018 (map (num: "DP-" + toString num) (lib.range 1 8))
19 )) ++ [
20 {
21 name = "Free";
22 outputs_connected = [ "eDP-1" ];
23 outputs_disconnected = [ "HDMI-A-1" ];
24 configure_single = "eDP-1";
25 }
26 {
27 name = "Fallback";
28 configure_single = "eDP-1";
29 }
30 ];
31 };
32
Skyler Grey047664c2023-04-15 14:34:48 +000033 home.file.".config/prelaunch/displays.sh".text = ''
Skyler Greya16cb702023-03-11 19:20:06 +000034 ${pkgs.grobi}/bin/grobi watch -v
35 '';
Skyler Grey047664c2023-04-15 14:34:48 +000036 home.file.".config/prelaunch/displays.sh".executable = true;
Skyler Greya16cb702023-03-11 19:20:06 +000037 systemd.user.services.grobi.Install.WantedBy = lib.mkForce [ ];
Skyler Grey73c49312023-01-26 00:45:17 +000038 };
39}