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" ]; |
| 13 | configure_command = "xrandr --output eDP-1 --primary --mode 2256x1504 --pos 0x2160 --rotate normal --output ${output} --mode 3840x2160 --pos 1366x0 --rotate normal"; |
Skyler Grey | 73c4931 | 2023-01-26 00:45:17 +0000 | [diff] [blame] | 14 | |
Skyler Grey | a16cb70 | 2023-03-11 19:20:06 +0000 | [diff] [blame] | 15 | atomic = true; |
| 16 | primary = "eDP-1"; |
| 17 | }) |
Skyler Grey | 047664c | 2023-04-15 14:34:48 +0000 | [diff] [blame] | 18 | ([ "HDMI-A-1" "HDMI-A-1-0" "HDMI-1-1" ] ++ |
Skyler Grey | a16cb70 | 2023-03-11 19:20:06 +0000 | [diff] [blame] | 19 | (map (num: "DP-" + toString num) (lib.range 1 8)) |
| 20 | )) ++ [ |
| 21 | { |
| 22 | name = "Free"; |
| 23 | outputs_connected = [ "eDP-1" ]; |
| 24 | outputs_disconnected = [ "HDMI-A-1" ]; |
| 25 | configure_single = "eDP-1"; |
| 26 | } |
| 27 | { |
| 28 | name = "Fallback"; |
| 29 | configure_single = "eDP-1"; |
| 30 | } |
| 31 | ]; |
| 32 | }; |
| 33 | |
Skyler Grey | 047664c | 2023-04-15 14:34:48 +0000 | [diff] [blame] | 34 | home.file.".config/prelaunch/displays.sh".text = '' |
Skyler Grey | a16cb70 | 2023-03-11 19:20:06 +0000 | [diff] [blame] | 35 | ${pkgs.grobi}/bin/grobi watch -v |
| 36 | ''; |
Skyler Grey | 047664c | 2023-04-15 14:34:48 +0000 | [diff] [blame] | 37 | home.file.".config/prelaunch/displays.sh".executable = true; |
Skyler Grey | a16cb70 | 2023-03-11 19:20:06 +0000 | [diff] [blame] | 38 | systemd.user.services.grobi.Install.WantedBy = lib.mkForce [ ]; |
Skyler Grey | 73c4931 | 2023-01-26 00:45:17 +0000 | [diff] [blame] | 39 | }; |
| 40 | } |