Generalize monitors so they work across WMs
This commit is contained in:
parent
79c213bd64
commit
704f1f1c79
4 changed files with 25 additions and 27 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue