Add kanshi to autoconfigure monitor layout

This commit is contained in:
Valentin Brandl 2024-11-24 00:32:44 +01:00
parent 65e738320e
commit ac626bcacd
Signed by: vbrandl
GPG Key ID: 7FB009175885FC76
3 changed files with 34 additions and 1 deletions

View File

@ -38,7 +38,8 @@ user:
./rofi.nix
./rust.nix
./signal.nix
./sway.nix
./sway/default.nix
./sway/kanshi.nix
./telegram.nix
./thunderbird.nix
./tmux.nix

32
home/sway/kanshi.nix Normal file
View File

@ -0,0 +1,32 @@
{ config, ... }: {
# automatically configure monitor layout depending on connected devices
# https://git.sr.ht/~emersion/kanshi
services.kanshi = {
enable = config.wayland.windowManager.sway.enable;
settings = [
{
profile = {
name = "home";
outputs = [
{
criteria = "eDP-1";
}
{
criteria = "HDMI-A-1";
}
];
};
}
{
profile = {
name = "mobile";
outputs = [
{
criteria = "eDP-1";
}
];
};
}
];
};
}