Add niri and rework graphical modules (monitors and targets) #6
|
@ -47,28 +47,13 @@
|
|||
wayland.windowManager.sway.config.input."type:keyboard".xkb_layout = "jp";
|
||||
wayland.windowManager.sway.config.input."type:pointer".accel_profile = "flat";
|
||||
# 144hz adaptive refresh ON!
|
||||
wayland.windowManager.sway.config.output =
|
||||
let
|
||||
scale = 1.5;
|
||||
top_x = builtins.ceil (3840 / scale);
|
||||
top_y = 0;
|
||||
in
|
||||
with config.common.monitors; {
|
||||
${home_4k.name} = {
|
||||
scale = toString scale;
|
||||
position = "0 0";
|
||||
};
|
||||
${home_1440.name} = {
|
||||
position = "${toString top_x} ${toString top_y}";
|
||||
};
|
||||
};
|
||||
nki.programs.kitty.enable = true;
|
||||
nki.programs.kitty.fontSize = 14;
|
||||
programs.my-waybar.makeBars = with config.common.monitors; barWith: [
|
||||
# For primary
|
||||
(barWith { extraSettings = { output = [ home_4k.name ]; }; })
|
||||
(barWith { extraSettings = { output = [ home_4k.meta.connection ]; }; })
|
||||
# For secondary, hide mpd
|
||||
(barWith { showMedia = false; showConnectivity = false; extraSettings = { output = [ home_1440.name ]; }; })
|
||||
(barWith { showMedia = false; showConnectivity = false; extraSettings = { output = [ home_1440.meta.connection ]; }; })
|
||||
];
|
||||
|
||||
# Yellow light!
|
||||
|
|
|
@ -11,7 +11,7 @@ let
|
|||
style = ./swaync.css;
|
||||
};
|
||||
systemd.user.services.swaync.Install.WantedBy = lib.mkForce [ "sway-session.target" ];
|
||||
systemd.user.services.swaync.Unit.PartOf = lib.mkForce [ "sway-session.target" ];
|
||||
systemd.user.services.swaync.Unit.PartOf = lib.mkForce [ "graphical-session.target" ];
|
||||
|
||||
programs.my-waybar = {
|
||||
extraSettings = [{
|
||||
|
|
|
@ -5,32 +5,41 @@ let
|
|||
# Internal
|
||||
"framework" = {
|
||||
name = "BOE 0x0BCA Unknown";
|
||||
mode = "2256x1504@60Hz";
|
||||
meta.mode = { width = 2256; height = 1504; refresh = 60.0; };
|
||||
scale = 1.25;
|
||||
};
|
||||
# External
|
||||
## Work @ EPFL
|
||||
"work" = {
|
||||
name = "LG Electronics LG ULTRAFINE 301MAXSGHD10";
|
||||
mode = "3840x2160@60Hz";
|
||||
meta.mode = { width = 3840; height = 2160; refresh = 60.0; };
|
||||
scale = 1.25;
|
||||
};
|
||||
"home_4k" = {
|
||||
name = "AOC U28G2G6B PPYP2JA000013";
|
||||
mode = "3840x2160@60Hz";
|
||||
scale = 1.5;
|
||||
adaptive_sync = "on";
|
||||
# render_bit_depth = "10";
|
||||
meta = {
|
||||
connection = "DP-2";
|
||||
mode = { width = 3840; height = 2160; refresh = 60.0; };
|
||||
fixedPosition = { x = 0; y = 0; };
|
||||
niriName = "PNP(AOC) U28G2G6B PPYP2JA000013";
|
||||
};
|
||||
};
|
||||
"home_1440" = {
|
||||
name = "AOC Q27G2G3R3B VXJP6HA000442";
|
||||
mode = "2560x1440@165Hz";
|
||||
adaptive_sync = "on";
|
||||
meta = {
|
||||
connection = "DP-3";
|
||||
mode = { width = 2560; height = 1440; refresh = 165.0; };
|
||||
fixedPosition = { x = 2560; y = 0; };
|
||||
niriName = "PNP(AOC) Q27G2G3R3B VXJP6HA000442";
|
||||
};
|
||||
};
|
||||
|
||||
"viewsonic_1080" = {
|
||||
name = "ViewSonic Corporation XG2402 SERIES V4K182501054";
|
||||
mode = "1920x1080@144Hz";
|
||||
meta.mode = { width = 1920; height = 1080; refresh = 144.0; };
|
||||
adaptive_sync = "on";
|
||||
};
|
||||
|
||||
|
@ -38,9 +47,13 @@ let
|
|||
|
||||
eachMonitor = _name: monitor: {
|
||||
name = monitor.name;
|
||||
value = builtins.removeAttrs monitor [ "scale" "name" ] // (if monitor ? scale then {
|
||||
value = builtins.removeAttrs monitor [ "scale" "name" "meta" ] // (lib.optionalAttrs (monitor ? scale) {
|
||||
scale = toString monitor.scale;
|
||||
} else { });
|
||||
}) // {
|
||||
mode = with monitor.meta.mode; "${toString width}x${toString height}@${toString refresh}Hz";
|
||||
} // (lib.optionalAttrs (monitor.meta ? fixedPosition) {
|
||||
position = with monitor.meta.fixedPosition; "${toString x} ${toString y}";
|
||||
});
|
||||
};
|
||||
in
|
||||
{
|
||||
|
|
|
@ -240,7 +240,7 @@ in
|
|||
lib.mkIf cfg.enable {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
systemd.target = "sway-session.target";
|
||||
systemd.target = "graphical-session.target";
|
||||
settings = cfg.makeBars barWith;
|
||||
style = ''
|
||||
* {
|
||||
|
|
Loading…
Reference in a new issue