nixos-config/modules/home/shikane.nix
2025-02-26 22:18:59 -05:00

77 lines
1.9 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;
}
];
}
];
};
}