nix/home/file/waybar/style/Plugin.nix

97 lines
2.2 KiB
Nix
Raw Normal View History

{
2024-11-04 04:37:29 +03:00
config,
...
}: let
paddingH = "12px";
paddingV = "0";
in {
# ISSUE: https://github.com/Alexays/Waybar/issues/3303
# This way I am forced to apply the padding to children of each group
# instead of the whole group.
text = ''
/* See the ISSUE above. */
2024-11-19 00:27:40 +03:00
#custom-taghw1,
2024-11-19 06:38:10 +03:00
#custom-tagbt1 {
2024-11-04 04:37:29 +03:00
padding-left: ${paddingH};
}
2024-09-13 23:57:09 +03:00
2024-11-19 00:27:40 +03:00
#custom-taghw2,
2024-11-19 06:38:10 +03:00
#custom-tagbt2 {
2024-11-04 04:37:29 +03:00
padding-right: ${paddingH};
}
2024-09-13 23:57:09 +03:00
/* Padding for global widgets. */
#clock,
#custom-display,
#language,
#mpris,
#pulseaudio,
#scratchpad,
#tray {
padding: ${paddingV} ${paddingH};
2024-11-04 04:37:29 +03:00
}
2024-05-04 09:23:33 +03:00
/* Padding for combined widgets. */
2024-11-19 00:27:40 +03:00
#cpu.load,
2024-11-04 04:37:29 +03:00
#custom-powerlimit,
#custom-powersave,
#memory,
#temperature {
padding-left: 4px;
}
2024-05-04 09:23:33 +03:00
/* Hover style. */
2024-11-04 04:37:29 +03:00
#batteryinfo:hover,
#clock:hover,
#custom-display:hover,
#hardware:hover,
#language:hover,
#mpris:hover,
#pulseaudio:hover,
#scratchpad:hover,
#tray:hover,
#workspaces button:hover {
2024-11-23 07:44:51 +03:00
background-color: rgba(${config.module.style.color.borderR},${config.module.style.color.borderG},${config.module.style.color.borderB},${toString config.module.style.opacity.desktop});
2024-11-04 04:37:29 +03:00
}
2024-05-24 03:43:20 +03:00
/* Critical state. */
#battery,
2024-11-19 00:27:40 +03:00
#cpu.usage,
#custom-display,
#memory,
#pulseaudio,
#temperature,
#tray {
border-top: ${toString config.module.style.window.border}px solid transparent;
border-bottom: ${toString config.module.style.window.border}px solid transparent;
}
#battery.critical,
2024-11-19 00:27:40 +03:00
#cpu.usage.critical,
#custom-display.modified,
#memory.critical,
2024-11-04 04:37:29 +03:00
#pulseaudio.muted,
#pulseaudio.source-muted,
#temperature.critical,
#tray.needs-attention {
2024-11-04 04:37:29 +03:00
border-top: ${toString config.module.style.window.border}px solid #${config.module.style.color.accent};
}
2024-05-24 03:43:20 +03:00
/* Widget-specific styling. */
2024-11-04 04:37:29 +03:00
#workspaces button {
padding: ${paddingV} 4px;
border-top: ${toString config.module.style.window.border}px solid transparent;
border-bottom: ${toString config.module.style.window.border}px solid transparent;
border-radius: 0;
}
2024-05-24 03:43:20 +03:00
2024-11-04 04:37:29 +03:00
#workspaces button.focused {
border-top: ${toString config.module.style.window.border}px solid #${config.module.style.color.accent};
}
#clock {
font-weight: bold;
}
2024-11-04 04:37:29 +03:00
'';
2024-05-02 04:47:21 +03:00
}