Specialize display config against display names and not port names

This commit is contained in:
Bun 2025-05-06 04:20:03 -04:00
parent 4c6fecb530
commit 60e9924131
8 changed files with 33 additions and 61 deletions

View file

@ -88,22 +88,10 @@
};
# Clocks
longClockModule = {
exec = pkgs.writeScript "longClock" ''
time=$(date +'%a %b %-d %-I:%M:%S%p')
date=$(date "+%Y-%m-%d")
echo "{\"text\":\" $time\",\"tooltip\":\"$date\"}"
'';
format = "{}";
return-type = "json";
clockModule = {
interval = 1;
tooltip = true;
};
shortClockModule = {
exec = "echo ' '$(date +'%l:%M%p' | sed 's/^ //')";
interval = 60;
tooltip = false;
format = "{:%a %b %d %I:%M:%S%p}";
tooltip-format = "<tt><small>{calendar}</small></tt>";
};
# Misc
@ -232,11 +220,10 @@
position = "top";
layer = "top";
output = [
"DSI-1"
"HDMI-A-1"
"LVDS-1"
"eDP-1"
"DP-1"
"!DP-2"
"!DP-3"
"!HDMI-A-2"
"*"
];
modules-left = [
"sway/workspaces"
@ -256,7 +243,7 @@
"custom/vram"
"backlight"
"battery"
"custom/clock-long"
"clock"
"gamemode"
"sway/scratchpad"
"privacy"
@ -277,7 +264,7 @@
"custom/vram" = vramModule;
"backlight" = backlightModule;
"battery" = batteryModule;
"custom/clock-long" = longClockModule;
"clock" = clockModule;
"sway/scratchpad" = scratchpadModule;
"privacy" = privacyModule;
"tray" = trayModule;
@ -290,12 +277,9 @@
position = "top";
layer = "top";
output = [
"!DSI-1"
"!HDMI-A-1"
"!LVDS-1"
"!eDP-1"
"!DP-1"
"*"
"DP-2"
"DP-3"
"HDMI-A-2"
];
modules-left = [
"sway/workspaces"
@ -310,7 +294,7 @@
"cpu"
"memory"
"custom/vram"
"custom/clock-long"
"clock"
];
"sway/workspaces" = swayWorkspaceModule;
"sway/window" = windowModule;
@ -322,7 +306,7 @@
"cpu" = cpuModule;
"memory" = ramModule;
"custom/vram" = vramModule;
"custom/clock-long" = longClockModule;
"clock" = clockModule;
};
};
@ -380,7 +364,7 @@
#cpu, #memory, #custom-vram, #mpd, #backlight, #battery, #custom-weather, #custom-weather2, #custom-notifs {
margin: 0 5px 0 2px;
}
#custom-clock-long, #custom-clock-short {
#clock {
margin: 0 2px 0 2px;
}
#cpu {
@ -398,10 +382,7 @@
#mpd.paused {
color: #888;
}
#custom-clock-long {
border-bottom: 3px solid #0a6cf5;
}
#custom-clock-short {
#clock {
border-bottom: 3px solid #0a6cf5;
}
#backlight {