nixos-config/modules/home/shikane.nix
2025-02-21 13:07:22 -05:00

94 lines
2.5 KiB
Nix

{ pkgs, ... }:
let
tomlFormat = pkgs.formats.toml {};
in {
home.packages = [ pkgs.shikane ];
systemd.user.services.shikane = {
Unit = {
Description = "Shikane";
After = [ "graphical-session.target" ];
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
Service = {
Type = "simple";
ExecStart = "${pkgs.shikane}/bin/shikane";
};
};
xdg.configFile."shikane/config.toml".source = tomlFormat.generate "shikane-config" {
profile = [
{
name = "desk-clam";
exec = [ "notify-send shikane \"Profile $SHIKANE_PROFILE_NAME has been applied\"" ];
output = [
{
search = "eDP-1";
enable = false;
}
{
search = [ "m=BenQ PD2725U" "s=N2N00414019" "v=PNP(BNQ)" ];
enable = true;
mode = "3840x2160@59.997Hz";
position = "0,0";
scale = 1;
}
];
}
{
name = "desk-dual";
exec = [ "notify-send shikane \"Profile $SHIKANE_PROFILE_NAME has been applied\"" ];
output = [
{
search = "eDP-1";
enable = true;
mode = "2560x1600@240Hz";
position = "3840,0";
adaptive_sync = true;
scale = 1;
}
{
enable = true;
search = [ "m=BenQ PD2725U" "s=N2N00414019" "v=PNP(BNQ)" ];
mode = "3840x2160@59.997Hz";
position = "0,0";
scale = 1;
}
];
}
{
name = "laptop";
exec = [ "notify-send shikane \"Profile $SHIKANE_PROFILE_NAME has been applied\"" ];
output = [
{
enable = true;
search = "eDP-1";
mode = "2560x1600@240Hz";
position = "0,0";
adaptive_sync = true;
scale = 1;
}
];
}
{
name = "laptop-mirror";
exec = [ "notify-send shikane \"Profile $SHIKANE_PROFILE_NAME has been applied\"" "wl-present mirror eDP-1 & sleep .5; wl-present fullscreen-output HDMI-A-1; wl-present fullscreen" ];
output = [
{
enable = true;
search = [ "m=TL140ADXP04-0" "s=" "v=Thermotrex Corporation" ];
mode = "2560x1600@240Hz";
position = "0,0";
adaptive_sync = true;
}
{
enable = true;
search = "n/HDMI-[ABC]-[1-9]";
}
];
}
];
};
}