sway: Use kanshi for output management

Fixes #46.
This commit is contained in:
Simon Bruder 2021-03-07 17:38:35 +01:00
parent 724bcd31c5
commit 442297ec85
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC

View file

@ -45,18 +45,7 @@ lib.mkIf nixosConfig.sbruder.gui.enable {
menu = "${pkgs.dmenu-wayland}/bin/dmenu-wl_path | ${pkgs.dmenu-wayland}/bin/dmenu-wl -nb '#002b36' -nf '#839496' -sb '#859900' -sf '#073642' | ${pkgs.findutils}/bin/xargs swaymsg exec --";
output = {
"*".bg = "${wallpaper} fill";
# FIXME: maybe use kanshi
eDP-1 = {
resolution = "1920x1080";
position = "0,424";
};
"Dell Inc. DELL U2410 F525M0A104NL" = {
resolution = "1920x1200";
position = "1920,0";
};
};
output."*".bg = "${wallpaper} fill";
input."type:keyboard" = {
xkb_layout = "de";
@ -531,6 +520,40 @@ lib.mkIf nixosConfig.sbruder.gui.enable {
};
};
services.kanshi = {
enable = true;
profiles =
let
getMachineConfig = machine: machines:
if lib.hasAttr machine machines
then lib.getAttr machine machines
else { };
in
getMachineConfig
(nixosConfig.networking.hostName)
{
nunotaba = {
standalone.outputs = lib.singleton {
criteria = "eDP-1";
mode = "1920x1080";
position = "0,0";
};
home.outputs = [
{
criteria = "eDP-1";
mode = "1920x1080";
position = "0,424";
}
{
criteria = "Dell Inc. DELL U2410 F525M0A104NL";
mode = "1920x1200";
position = "1920,0";
}
];
};
};
};
services.redshift = {
enable = true;
package = pkgs.redshift-wlr;