Fix monitor name

This commit is contained in:
muon 2024-10-18 09:12:38 +00:00
parent 633e306306
commit de87c67a25
3 changed files with 59 additions and 74 deletions

View file

@ -50,13 +50,13 @@ in {
## Monitors ## Monitors
mods.monitors = { mods.monitors = {
primary = { primary = {
name = "DVI-D-1"; name = "DVI-I-1";
config = { config = {
enable = true; enable = true;
mode = "1920x1080"; mode = "1920x1080";
position = "0x0"; position = "0x0";
primary = true; primary = true;
rate = "60.00"; rate = "59.93";
}; };
}; };
secondary = { secondary = {
@ -65,8 +65,7 @@ in {
enable = true; enable = true;
mode = "1280x768"; mode = "1280x768";
position = "1920x312"; position = "1920x312";
primary = false; rate = "59.99";
rate = "60.00";
}; };
}; };
}; };

View file

@ -16,10 +16,16 @@ in {
# Hardware preferences # Hardware preferences
## Monitors ## Monitors
xsession.windowManager.i3.config.workspaceOutputAssign = [{ xsession.windowManager.i3.config.workspaceOutputAssign = [
workspace = "1"; {
output = "${cfg.monitors.primary.name}"; workspace = "1";
}]; output = "${cfg.monitors.primary.name}";
}
{
workspace = "2";
output = "${cfg.monitors.secondary.name}";
}
];
services.autorandr.enable = true; services.autorandr.enable = true;
programs.autorandr = { programs.autorandr = {
enable = true; enable = true;
@ -31,34 +37,10 @@ in {
}; };
profiles.default = { profiles.default = {
fingerprint = { fingerprint = {
"${cfg.monitors.primary.name}" = '' "${cfg.monitors.primary.name}" =
00ffffffffffff004c2d850433324d43 "00ffffffffffff004c2d850433324d431a120103803420782aee91a3544c99260f5054bfef80714f8100814081809500a940b30001011a3680a070381f403020350006202000001a000000fd00384b1e5111000a202020202020000000fc0053796e634d61737465720a2020000000ff004831414b3530303030300a202000e9";
1a120103803420782aee91a3544c9926 "${cfg.monitors.secondary.name}" =
0f5054bfef80714f8100814081809500 "00ffffffffffff00410cca140101010134100103804728788a288e9e5548972416484badce0031594559615981800101010101010101a91a00a05000163030203700c48e21000018662150b051001b3040703600c48e21000018000000fc005068696c697073545620283529000000fd002f551f500e000a2020202020200156020323714f930414051f10121103020116150706230907078301000066030c00100080011d00bc52d01e20b8285540c48e2100001a011d007251d01e206e285500c48e2100001e011d80d0721c1620102c2580c48e2100009e011d8018711c1620582c2500c48e2100009ef33980d072382d40102c4580c48e2100001e0000f2";
a940b30001011a3680a070381f403020
350006202000001a000000fd00384b1e
5111000a202020202020000000fc0053
796e634d61737465720a2020000000ff
004831414b3530303030300a202000e9
'';
"${cfg.monitors.secondary.name}" = ''
00ffffffffffff00410cca1401010101
34100103804728788a288e9e55489724
16484badce0031594559615981800101
010101010101a91a00a0500016303020
3700c48e21000018662150b051001b30
40703600c48e21000018000000fc0050
68696c697073545620283529000000fd
002f551f500e000a2020202020200156
020323714f930414051f101211030201
16150706230907078301000066030c00
100080011d00bc52d01e20b8285540c4
8e2100001a011d007251d01e206e2855
00c48e2100001e011d80d0721c162010
2c2580c48e2100009e011d8018711c16
20582c2500c48e2100009ef33980d072
382d40102c4580c48e2100001e0000f2
'';
}; };
config = { config = {
"${cfg.monitors.primary.name}" = cfg.monitors.primary.config; "${cfg.monitors.primary.name}" = cfg.monitors.primary.config;

View file

@ -14,29 +14,30 @@
separator = ""; separator = "";
}; };
icons = "awesome5"; icons = "awesome5";
blocks = [{ blocks = [
block = "sound"; {
format = " $icon $volume "; block = "sound";
click = [{ format = " $icon $volume ";
button = "left"; click = [{
cmd = "pavucontrol"; button = "left";
}]; cmd = "pavucontrol";
} { }];
}
{
block = "time"; block = "time";
format = "$icon $timestamp.datetime(f:'%Y-%m-%d %a %H:%M:%S') "; format = "$icon $timestamp.datetime(f:'%Y-%m-%d %a %H:%M:%S') ";
interval = 1; interval = 1;
}]; }
];
}; };
}; };
xsession.windowManager.i3 = let xsession.windowManager.i3 = let
modifier = "Mod4"; modifier = "Mod4";
wsAmount = 10; wsAmount = 10;
genSpaces = f: map builtins.toString ( genSpaces = f: map builtins.toString (builtins.genList f wsAmount);
builtins.genList f wsAmount workspaces = genSpaces (x: x + 1);
);
workspaces = genSpaces (x: x+1);
in { in {
enable = true; enable = true;
config = { config = {
@ -53,38 +54,43 @@
workspaceAutoBackAndForth = true; workspaceAutoBackAndForth = true;
focus.wrapping = "yes"; focus.wrapping = "yes";
startup = [ ] ++ lib.optionals config.mods.social.enable [{
command = "exec vesktop";
}];
assigns = {
"2" = [{ class = "^electron$"; }];
"3" = [{ class = "^Steam$"; }];
};
keybindings = let keybindings = let
# modKeyComb: string -> valueAction: string # modKeyComb: string -> valueAction: string
# -> keys: [string] -> values: [string] # -> keys: [string] -> values: [string]
# -> keybindings: attrSet { string -> string } # -> keybindings: attrSet { string -> string }
zipBinds = comb: action: keys: values: ( zipBinds = comb: action: keys: values:
builtins.listToAttrs (lib.zipListsWith (k: v: { (builtins.listToAttrs (lib.zipListsWith (k: v: {
name = "${modifier}${comb}${k}"; name = "${modifier}${comb}${k}";
value = "${action} ${v}"; value = "${action} ${v}";
}) keys values) }) keys values));
);
moveKeys = ["h" "j" "k" "l"]; moveKeys = [ "h" "j" "k" "l" ];
moveDirs = ["left" "down" "up" "right"]; moveDirs = [ "left" "down" "up" "right" ];
workspKeys = genSpaces (x: lib.mod (x+1) wsAmount); workspKeys = genSpaces (x: lib.mod (x + 1) wsAmount);
in lib.mkOptionDefault ( in lib.mkOptionDefault ((zipBinds "+" "focus" moveKeys moveDirs)
(zipBinds "+" "focus" moveKeys moveDirs) // // (zipBinds "+Shift+" "move" moveKeys moveDirs)
(zipBinds "+Shift+" "move" moveKeys moveDirs) // // (zipBinds "+" "workspace number" workspKeys workspaces)
(zipBinds "+" "workspace number" workspKeys workspaces) // // (zipBinds "+Shift+" "move container to workspace number" workspKeys
(zipBinds "+Shift+" "move container to workspace number" workspaces) // {
workspKeys workspaces) // "XF86AudioRaiseVolume" =
{ "exec --no-startup-id pactl set-sink-volume 0 +2%";
"XF86AudioRaiseVolume" = "XF86AudioLowerVolume" =
"exec --no-startup-id pactl set-sink-volume 0 +2%"; "exec --no-startup-id pactl set-sink-volume 0 -2%";
"XF86AudioLowerVolume" = });
"exec --no-startup-id pactl set-sink-volume 0 -2%";
}
);
bars = let bars = let
status_conf = status_conf =
"${config.xdg.configHome}/i3status-rust/config-default.toml"; "${config.xdg.configHome}/i3status-rust/config-default.toml";
stylix_bar = { stylix_bar = {
mode = "dock"; mode = "dock";
@ -96,9 +102,7 @@
workspaceNumbers = true; workspaceNumbers = true;
trayOutput = "primary"; trayOutput = "primary";
} // config.lib.stylix.i3.bar; } // config.lib.stylix.i3.bar;
in [ in [ stylix_bar ];
stylix_bar
];
}; };
}; };
}; };