nishimiya: Configure multihead

This commit is contained in:
PapaTutuWawa 2021-11-06 21:33:05 +01:00
parent 408dfb90a7
commit aaca3bf66f
2 changed files with 31 additions and 2 deletions

View File

@ -42,6 +42,8 @@
}; };
services = { services = {
kanshi = let kanshi = let
horizontal = "Samsung Electric Company C27F398 H4ZR101145";
helpers = import ../lib/helpers/kanshi.nix; helpers = import ../lib/helpers/kanshi.nix;
mkProfile = helpers.mkProfile; mkProfile = helpers.mkProfile;
wallpaperScript = helpers.mkWallpaperScript { wallpaperScript = helpers.mkWallpaperScript {
@ -50,7 +52,7 @@
in { in {
enable = true; enable = true;
profiles = { profiles = {
home = mkProfile { laptop = mkProfile {
outputs = [ outputs = [
{ {
criteria = "eDP-1"; criteria = "eDP-1";
@ -59,9 +61,29 @@
position = "0,0"; position = "0,0";
} }
]; ];
name = "home"; name = "laptop";
script = wallpaperScript; script = wallpaperScript;
}; };
laptopHomeMultihead = mkProfile {
outputs = [
{
criteria = horizontal;
status = "enable";
mode = "1920x1080";
position = "-1080,0";
}
{
criteria = "eDP-1";
status = "enable";
mode = "1920x1080";
position = "0,0";
}
];
name = "laptopHomeMultihead";
script = wallpaperScript;
};
# TODO: Generic multihead
}; };
}; };
swaync.enable = true; swaync.enable = true;

View File

@ -24,6 +24,13 @@
setbg "DP-2" $horiz setbg "DP-2" $horiz
setbg "HDMI-A-3" $vert setbg "HDMI-A-3" $vert
;; ;;
laptopHomeMultihead)
horiz1=$(random_file ${wallpapersHorizontal})
horiz2=$(random_file ${wallpapersHorizontal})
setbg "eDP-1" $horiz1
setbg "HDMI-A-1" $horiz2
;;
genericMultihead) genericMultihead)
horiz1=$(random_file ${wallpapersHorizontal}) horiz1=$(random_file ${wallpapersHorizontal})
horiz2=$(random_file ${wallpapersHorizontal}) horiz2=$(random_file ${wallpapersHorizontal})