dotfiles/homes/modules/kanshi.nix

60 lines
1.5 KiB
Nix
Executable file

{
config,
pkgs,
...
}: {
# Change monitor positions
# TODO: find a way to make this modular (ie put something different for my laptop)
# my idea is to have a "monitors" module and use kanshi for wayland
services.kanshi = {
enable = true;
systemdTarget = "hyprland-session.target";
# You can find your monitors in hyprland by using `hyprctl monitors all`
settings = [
{
# 1920x1080@144 gaming monitor
output.criteria = "HDMI-A-1";
output.mode = "1920x1080@119.98Hz";
output.scale = 1.0;
output.adaptiveSync = false; # Variable Refresh Rate (this can be changed for gaming)
}
{
# 4k side monitor
output.criteria = "DP-2";
output.mode = "3840x2160@60.00Hz";
output.scale = 2.0;
}
{
# laptop builtin screen
output.criteria = "eDP-1";
output.mode = "1920x1080@60.02Hz";
output.scale = 1.0;
}
{
# This is my dual-monitor desktop setup
profile.name = "myputer";
profile.outputs = [
{
criteria = "DP-2";
position = "0,0";
}
{
criteria = "HDMI-A-1";
position = "3840,0";
}
];
}
{
# This is my laptop (lolcathost) :)
profile.name = "lolcathost";
profile.outputs = [
{
criteria = "eDP-1";
position = "0,0";
}
];
}
];
};
}