Compare commits

..

2 commits

Author SHA1 Message Date
Evie Litherland-Smith 16914a2fa7 Change module layout for alt waybar 2024-06-15 09:59:00 +01:00
Evie Litherland-Smith 8f179c9f6b 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
2024-06-15 09:57:26 +01:00
6 changed files with 303 additions and 269 deletions

View file

@ -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];
};
}
];
};
}

View file

@ -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";
};
}

View file

@ -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];
};
}
];
};
}

View file

@ -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" = ["sway/workspaces"];
"modules-center" = [];
"modules-right" = ["clock"];
};
};
}

View file

@ -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 =

View file

@ -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";