Update kanshi to use settings instead of profiles
Add kanshi config to Northstar Standardise monitor config across machines Move waybar alt bar definition to Vanguard config specifically, don't need to use hacky solution
This commit is contained in:
parent
e869e866f1
commit
8f179c9f6b
|
@ -1,8 +1,42 @@
|
|||
{...}: {
|
||||
imports = [./default.nix];
|
||||
wayland.windowManager.sway.config.output = {
|
||||
"eDP-1" = {
|
||||
scale = "1.25";
|
||||
wayland.windowManager.sway.config = let
|
||||
defaultOutput = "eDP-1";
|
||||
in {
|
||||
output.${defaultOutput}.scale = "1.25";
|
||||
workspaceOutputAssign = [
|
||||
{
|
||||
output = defaultOutput;
|
||||
workspace = "1";
|
||||
}
|
||||
];
|
||||
};
|
||||
services.kanshi = {
|
||||
enable = true;
|
||||
settings = let
|
||||
laptopScreen = {
|
||||
criteria = "eDP-1";
|
||||
scale = 1.25;
|
||||
position = "3000,636";
|
||||
};
|
||||
monitor1 = {
|
||||
criteria = "Acer Technologies ED270R TJMEE0043W01";
|
||||
mode = "1920x1080@165Hz";
|
||||
position = "1080,420";
|
||||
};
|
||||
monitor2 = {
|
||||
criteria = "Ancor Communications Inc VS278 FALMQS032358";
|
||||
position = "0,0";
|
||||
transform = "270";
|
||||
};
|
||||
in [
|
||||
{output = laptopScreen;}
|
||||
{
|
||||
profile = {
|
||||
name = "docked";
|
||||
outputs = [laptopScreen monitor1 monitor2];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
{...}: {
|
||||
imports = [./work.nix];
|
||||
wayland.windowManager.sway.config.output = {
|
||||
"Dell Inc. DELL P3223QE CCG8YN3" = {
|
||||
pos = "0 0";
|
||||
scale = "1.5";
|
||||
};
|
||||
wayland.windowManager.sway.config = {
|
||||
output."Dell Inc. DELL P3223QE CCG8YN3".scale = "1.5";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,34 +1,37 @@
|
|||
{...}: {
|
||||
imports = [./work.nix];
|
||||
wayland.windowManager.sway.config.output = {
|
||||
"eDP-1" = {
|
||||
scale = "1.25";
|
||||
position = "2560 576";
|
||||
};
|
||||
"Dell Inc. DELL P3223QE CCG8YN3" = {
|
||||
scale = "1.5";
|
||||
position = "0 0";
|
||||
};
|
||||
wayland.windowManager.sway.config = let
|
||||
defaultOutput = "eDP-1";
|
||||
in {
|
||||
output.${defaultOutput}.scale = "1.25";
|
||||
workspaceOutputAssign = [
|
||||
{
|
||||
output = defaultOutput;
|
||||
workspace = "1";
|
||||
}
|
||||
];
|
||||
};
|
||||
services.kanshi = {
|
||||
enable = true;
|
||||
systemdTarget = "sway-session.target";
|
||||
profiles = let
|
||||
settings = let
|
||||
laptopScreen = {
|
||||
criteria = "eDP-1";
|
||||
status = "enable";
|
||||
scale = 1.25;
|
||||
position = "2560,576";
|
||||
};
|
||||
monitor = {
|
||||
criteria = "Dell Inc. DELL P3223QE CCG8YN3";
|
||||
status = "enable";
|
||||
};
|
||||
in {
|
||||
undocked = {
|
||||
outputs = [laptopScreen];
|
||||
};
|
||||
docked = {
|
||||
outputs = [monitor laptopScreen];
|
||||
scale = 1.5;
|
||||
position = "0,0";
|
||||
};
|
||||
in [
|
||||
{output = laptopScreen;}
|
||||
{
|
||||
profile = {
|
||||
name = "docked";
|
||||
outputs = [laptopScreen monitor];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
{pkgs, ...}: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./default.nix
|
||||
../programs/games/default.nix
|
||||
|
@ -8,30 +12,39 @@
|
|||
freecad
|
||||
prusa-slicer
|
||||
];
|
||||
wayland.windowManager.sway.config = {
|
||||
startup = [
|
||||
{command = "${pkgs.xorg.xrandr}/bin/xrandr --output DP-2 --primary";}
|
||||
];
|
||||
wayland.windowManager.sway.config = let
|
||||
defaultOutput = "DP-2";
|
||||
in {
|
||||
output = {
|
||||
"Acer Technologies ED270R TJMEE0043W01" = {
|
||||
mode = "1920x1080@165Hz";
|
||||
pos = "1080 420";
|
||||
position = "1080 420";
|
||||
adaptive_sync = "off";
|
||||
};
|
||||
"Ancor Communications Inc VS278 FALMQS032358" = {
|
||||
pos = "0 0";
|
||||
position = "0 0";
|
||||
transform = "270";
|
||||
};
|
||||
};
|
||||
workspaceOutputAssign = [
|
||||
{
|
||||
output = "HDMI-A-1";
|
||||
output = defaultOutput;
|
||||
workspace = "1";
|
||||
}
|
||||
];
|
||||
startup = [
|
||||
{command = "${pkgs.xorg.xrandr}/bin/xrandr --output ${defaultOutput} --primary";}
|
||||
];
|
||||
};
|
||||
programs.waybar.settings = {
|
||||
main.output = ["DP-2"];
|
||||
alt.output = ["HDMI-A-1"];
|
||||
alt = {
|
||||
inherit (config.programs.waybar.settings.main) layer position "sway/workspaces";
|
||||
name = "alt";
|
||||
output = ["HDMI-A-1"];
|
||||
"modules-left" = [];
|
||||
"modules-center" = ["sway/workspaces"];
|
||||
"modules-right" = [];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
accentColour2,
|
||||
...
|
||||
}: {
|
||||
programs.waybar.systemd.target = lib.mkIf config.wayland.windowManager.sway.systemd.enable "sway-session.target";
|
||||
services.kanshi.systemdTarget = lib.mkIf config.wayland.windowManager.sway.systemd.enable "sway-session.target";
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
package =
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
hostname,
|
||||
fonts,
|
||||
accentColour,
|
||||
...
|
||||
|
@ -13,12 +11,8 @@
|
|||
};
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd = {
|
||||
enable = true;
|
||||
target = "sway-session.target";
|
||||
};
|
||||
settings = rec {
|
||||
main = {
|
||||
systemd.enable = true;
|
||||
settings.main = {
|
||||
name = "main";
|
||||
layer = "top";
|
||||
position = "bottom";
|
||||
|
@ -237,15 +231,6 @@
|
|||
spacing = 5;
|
||||
};
|
||||
};
|
||||
# TEMP FIX
|
||||
alt = lib.mkIf (hostname == "Vanguard") {
|
||||
inherit (main) layer position "sway/workspaces";
|
||||
name = "alt";
|
||||
"modules-left" = [];
|
||||
"modules-center" = ["sway/workspaces"];
|
||||
"modules-right" = [];
|
||||
};
|
||||
};
|
||||
style = with config.scheme.withHashtag; let
|
||||
accent = config.scheme.withHashtag.${accentColour};
|
||||
alpha = "0.9";
|
||||
|
|
Reference in a new issue