58 lines
1.5 KiB
Nix
58 lines
1.5 KiB
Nix
{pkgs, ...}: let
|
|
notify = profile: [
|
|
"${pkgs.libnotify}/bin/notify-send -t 10000 -a 'Kanshi' '${profile}' 'Profile activated'"
|
|
];
|
|
in {
|
|
services.kanshi = {
|
|
enable = true;
|
|
profiles = {
|
|
undocked = {
|
|
outputs = [{criteria = "California Institute of Technology 0x1500 Unknown";}];
|
|
exec = notify "Undocked";
|
|
};
|
|
docked = {
|
|
outputs = [
|
|
{
|
|
criteria = "California Institute of Technology 0x1500 Unknown";
|
|
mode = "3840x2160@60Hz";
|
|
position = "0,1380";
|
|
scale = 2.0;
|
|
}
|
|
{
|
|
criteria = "BenQ Corporation BenQ GW2270 P9J02423SL0";
|
|
mode = "1920x1080@60Hz";
|
|
position = "1920,0";
|
|
scale = 1.0;
|
|
transform = "270";
|
|
}
|
|
{
|
|
criteria = "Goldstar Company Ltd IPS226 SerialNumber";
|
|
mode = "1920x1080@60Hz";
|
|
position = "3000,420";
|
|
scale = 1.0;
|
|
}
|
|
];
|
|
exec = notify "Docked";
|
|
};
|
|
dual = {
|
|
outputs = [
|
|
{
|
|
criteria = "BenQ Corporation BenQ GW2270 P9J02423SL0";
|
|
mode = "1920x1080@60Hz";
|
|
position = "1920,0";
|
|
scale = 1.0;
|
|
transform = "270";
|
|
}
|
|
{
|
|
criteria = "Goldstar Company Ltd IPS226 SerialNumber";
|
|
mode = "1920x1080@60Hz";
|
|
position = "3000,420";
|
|
scale = 1.0;
|
|
}
|
|
];
|
|
exec = notify "Dual";
|
|
};
|
|
};
|
|
};
|
|
}
|