home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

autorandr.nix (2972B)


      1 { config, lib, pkgs, ... }:
      2 let
      3   lg_ultrawide_curved = "00ffffffffffff001e6df6760cd105000a1b010380502278eaca95a6554ea1260f50542108007140818081c0a9c0b300d1c081000101e77c70a0d0a0295030203a00204f3100001a9d6770a0d0a0225030203a00204f3100001a000000fd00383d1e5a20000a202020202020000000fc004c4720554c545241574944450a012902031ef12309070749100403011f13595a128301000067030c00100038409f3d70a0d0a0155030203a00204f3100001a7e4800e0a0381f4040403a00204f31000018011d007251d01e206e285500204f3100001e8c0ad08a20e02d10103e9600204f31000018000000ff003731304e544a4a42373139360a0000000000000033";
      4   thinkpadt480s = "00ffffffffffff000daec91400000000081a0104951f11780228659759548e271e505400000001010101010101010101010101010101b43b804a71383440503c680035ad10000018000000fe004e3134304843412d4541420a20000000fe00434d4e0a202020202020202020000000fe004e3134304843412d4541420a20003e";
      5   thinkpadp1 = "00ffffffffffff000dae0c15000000002a1c0104b522137802ee95a3544c99260f505400000001010101010101010101010101010101363680a0703820405036680058c110000018363680a0703820405036680058c110000018000000fe00434d4e0a202020202020202020000000fe004e3135364843452d474e310a2001d102030f00e3058000e60605016a6a2400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005435313343363031415230320000000000000000000000000000000000de";
      6 in
      7 {
      8   programs.autorandr = {
      9     enable = true;
     10     hooks.postswitch."notify-i3" = "${config.xsession.windowManager.i3.package}/bin/i3-msg restart";
     11     hooks.postswitch."reset-background" = "systemctl --user start random-background.service";
     12     profiles = {
     13       p1-on-the-move = {
     14         fingerprint = {
     15           eDP-1 = thinkpadp1;
     16         };
     17         config = {
     18           eDP-1 = {
     19             enable = true;
     20             primary = true;
     21             position = "0x0";
     22             mode = "1920x1080";
     23           };
     24         };
     25       };
     26       p1-home = {
     27         fingerprint = {
     28           eDP-1 = thinkpadp1;
     29           DP-3-1 = lg_ultrawide_curved;
     30         };
     31         config = {
     32           eDP-1 = {
     33             enable = false;
     34           };
     35           DP-3-1 = {
     36             enable = true;
     37             primary = true;
     38             mode = "3440x1440";
     39             position = "0x0";
     40           };
     41         };
     42       };
     43       t480-on-the-move = {
     44         fingerprint = {
     45           eDP-1 = thinkpadt480s;
     46         };
     47         config = {
     48           eDP-1 = {
     49             enable = true;
     50             primary = true;
     51             position = "0x0";
     52             mode = "1920x1080";
     53           };
     54         };
     55       };
     56       t480-home = {
     57         fingerprint = {
     58           eDP-1 = thinkpadt480s;
     59           DP-3-1 = lg_ultrawide_curved;
     60         };
     61         config = {
     62           eDP-1 = {
     63             enable = false;
     64           };
     65           DP-3-1 = {
     66             enable = true;
     67             primary = true;
     68             mode = "3440x1440";
     69             position = "0x0";
     70           };
     71         };
     72       };
     73     };
     74   };
     75 }