Skyler Grey | a16cb70 | 2023-03-11 19:20:06 +0000 | [diff] [blame] | 1 | { lib, pkgs, ... }: { |
Skyler Grey | 81dd90e | 2023-03-26 10:45:11 +0000 | [diff] [blame] | 2 | config.boot.kernelParams = [ |
| 3 | "video=eDP-1:2256x1440@60" |
Skyler Grey | 047664c | 2023-04-15 14:34:48 +0000 | [diff] [blame] | 4 | "video=HDMI-1-1:3840x2160@76" |
Skyler Grey | 81dd90e | 2023-03-26 10:45:11 +0000 | [diff] [blame] | 5 | ]; |
Skyler Grey | a16cb70 | 2023-03-11 19:20:06 +0000 | [diff] [blame] | 6 | home = { |
| 7 | services.grobi = { |
| 8 | enable = true; |
| 9 | rules = (map |
| 10 | (output: { |
| 11 | name = "Docked (${output})"; |
| 12 | outputs_connected = [ output "eDP-1" ]; |
Skyler Grey | 494bba2 | 2023-04-17 08:14:02 +0000 | [diff] [blame] | 13 | configure_command = "xrandr --output eDP-1 --primary --mode 2256x1504 --pos 0x1454 --rotate normal --output ${output} --mode 3840x2160 --pos 2256x0 --rotate normal"; |
Skyler Grey | a16cb70 | 2023-03-11 19:20:06 +0000 | [diff] [blame] | 14 | atomic = true; |
| 15 | primary = "eDP-1"; |
| 16 | }) |
Skyler Grey | 047664c | 2023-04-15 14:34:48 +0000 | [diff] [blame] | 17 | ([ "HDMI-A-1" "HDMI-A-1-0" "HDMI-1-1" ] ++ |
Skyler Grey | a16cb70 | 2023-03-11 19:20:06 +0000 | [diff] [blame] | 18 | (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 Grey | 047664c | 2023-04-15 14:34:48 +0000 | [diff] [blame] | 33 | home.file.".config/prelaunch/displays.sh".text = '' |
Skyler Grey | a16cb70 | 2023-03-11 19:20:06 +0000 | [diff] [blame] | 34 | ${pkgs.grobi}/bin/grobi watch -v |
| 35 | ''; |
Skyler Grey | 047664c | 2023-04-15 14:34:48 +0000 | [diff] [blame] | 36 | home.file.".config/prelaunch/displays.sh".executable = true; |
Skyler Grey | a16cb70 | 2023-03-11 19:20:06 +0000 | [diff] [blame] | 37 | systemd.user.services.grobi.Install.WantedBy = lib.mkForce [ ]; |
Skyler Grey | 73c4931 | 2023-01-26 00:45:17 +0000 | [diff] [blame] | 38 | }; |
| 39 | } |