nix/home/config/waybar/style/Plugin.nix

94 lines
2.1 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-08 10:56:30 +03:00
#custom-tag1 {
2024-11-04 04:37:29 +03:00
padding-left: ${paddingH};
}
2024-09-13 23:57:09 +03:00
2024-11-08 10:56:30 +03:00
#custom-tag2 {
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-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 {
background-color: rgba(${config.module.style.color.border-r},${config.module.style.color.border-g},${config.module.style.color.border-b},${toString config.module.style.opacity.desktop});
}
2024-05-24 03:43:20 +03:00
/* Critical state. */
#battery,
#cpu,
#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,
#cpu.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
}