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 = [ |
Skyler Grey | e6e151f | 2023-05-01 08:07:28 +0000 | [diff] [blame] | 3 | "video=eDP-1:2256x1504@60" |
| 4 | "video=HDMI-1-1:1920x1080@144" |
| 5 | "video=DP-1-3:3840x2160@76" |
Skyler Grey | 81dd90e | 2023-03-26 10:45:11 +0000 | [diff] [blame] | 6 | ]; |
Skyler Grey | a16cb70 | 2023-03-11 19:20:06 +0000 | [diff] [blame] | 7 | home = { |
| 8 | services.grobi = { |
| 9 | enable = true; |
| 10 | rules = (map |
| 11 | (output: { |
| 12 | name = "Docked (${output})"; |
| 13 | outputs_connected = [ output "eDP-1" ]; |
Skyler Grey | 494bba2 | 2023-04-17 08:14:02 +0000 | [diff] [blame] | 14 | 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] | 15 | atomic = true; |
| 16 | primary = "eDP-1"; |
| 17 | }) |
Skyler Grey | e6e151f | 2023-05-01 08:07:28 +0000 | [diff] [blame] | 18 | ([ "HDMI-A-1" "HDMI-A-1-0" ] ++ |
Skyler Grey | a16cb70 | 2023-03-11 19:20:06 +0000 | [diff] [blame] | 19 | (map (num: "DP-" + toString num) (lib.range 1 8)) |
| 20 | )) ++ [ |
| 21 | { |
Skyler Grey | e6e151f | 2023-05-01 08:07:28 +0000 | [diff] [blame] | 22 | name = "Docked (HDMI-1-1 + DP-1-3)"; |
| 23 | outputs_connected = [ "HDMI-1-1" "eDP-1" "DP-1-3" ]; |
| 24 | configure_command = "xrandr --output HDMI-1-1 --mode 1920x1080 --pos 0x0 --rotate normal --output eDP-1 --primary --mode 2256x1504 --pos 0x1454 --rotate normal --output DP-1-3 --mode 3840x2160 --pos 2256x0 --rotate normal"; |
| 25 | atomic = true; |
| 26 | primary = "eDP-1"; |
| 27 | } |
| 28 | { |
Skyler Grey | a16cb70 | 2023-03-11 19:20:06 +0000 | [diff] [blame] | 29 | name = "Free"; |
| 30 | outputs_connected = [ "eDP-1" ]; |
Skyler Grey | e6e151f | 2023-05-01 08:07:28 +0000 | [diff] [blame] | 31 | outputs_disconnected = [ "HDMI-A-1" "HDMI-1-1" "DP-1-3" ]; |
Skyler Grey | a16cb70 | 2023-03-11 19:20:06 +0000 | [diff] [blame] | 32 | configure_single = "eDP-1"; |
| 33 | } |
| 34 | { |
| 35 | name = "Fallback"; |
| 36 | configure_single = "eDP-1"; |
| 37 | } |
| 38 | ]; |
| 39 | }; |
| 40 | |
Skyler Grey | 047664c | 2023-04-15 14:34:48 +0000 | [diff] [blame] | 41 | home.file.".config/prelaunch/displays.sh".text = '' |
Skyler Grey | a16cb70 | 2023-03-11 19:20:06 +0000 | [diff] [blame] | 42 | ${pkgs.grobi}/bin/grobi watch -v |
| 43 | ''; |
Skyler Grey | 047664c | 2023-04-15 14:34:48 +0000 | [diff] [blame] | 44 | home.file.".config/prelaunch/displays.sh".executable = true; |
Skyler Grey | a16cb70 | 2023-03-11 19:20:06 +0000 | [diff] [blame] | 45 | systemd.user.services.grobi.Install.WantedBy = lib.mkForce [ ]; |
Skyler Grey | 73c4931 | 2023-01-26 00:45:17 +0000 | [diff] [blame] | 46 | }; |
| 47 | } |