diff options
author | Freya Murphy <freya@freyacat.org> | 2025-06-17 21:57:53 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2025-06-17 21:57:53 -0400 |
commit | e0f2eb724245e02cb247b644f0947261d8665318 (patch) | |
tree | 13f929df40059d37165cbe46be95a6404a1bbecb /programs/waybar/style.nix | |
parent | refactor styles to new color scheme basis (diff) | |
download | dotfiles-nix-e0f2eb724245e02cb247b644f0947261d8665318.tar.gz dotfiles-nix-e0f2eb724245e02cb247b644f0947261d8665318.tar.bz2 dotfiles-nix-e0f2eb724245e02cb247b644f0947261d8665318.zip |
remove nix dir and move out all sub modules
Diffstat (limited to 'programs/waybar/style.nix')
-rw-r--r-- | programs/waybar/style.nix | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/programs/waybar/style.nix b/programs/waybar/style.nix new file mode 100644 index 0000000..0b84514 --- /dev/null +++ b/programs/waybar/style.nix @@ -0,0 +1,115 @@ +{ theme }: + +let + + fg = "#${theme.colors.fg}"; + bg = "#${theme.colors.bg}"; + surface-fg = "#${theme.colors.surface.fg}"; + surface-bg = "#${theme.colors.surface.bg}"; + primary = "#${theme.colors.primary}"; + success = "#${theme.colors.success}"; + warning = "#${theme.colors.warning}"; + error = "#${theme.colors.error}"; + fontSize = "${toString theme.font.size}px"; + outerGap = "${toString theme.outerGap}px"; + innerGap = "${toString theme.innerGap}px"; + outerRadius = "${toString theme.outerRadius}px"; + innerRadius = "${toString theme.innerRadius}px"; + borderWidth = "${toString theme.borderWidth}px"; + +in + +'' +/** Base */ + +* { + all: unset; +} + +window#waybar { + font-family: "${theme.font.regular}", "${theme.font.icon}", "${theme.font.monospace}"; + font-size: ${fontSize}; + color: ${fg}; + background-color: ${bg}; +} + +/** Workspaces */ + +#workspaces { + margin-left: ${outerGap}; +} + +#workspaces button { + border-radius: ${innerRadius}; + margin: 4px 2px; + padding: 0px 7px; + background: ${surface-bg}; + color: ${surface-fg}; +} + +#workspaces button.focused, +#workspaces button.active { + background: ${primary}; + color: ${bg}; +} + +#workspaces button.urgent { + background: ${error}; +} + +/** Tray */ + +#tray { + border: none; + margin-right: ${outerGap}; +} + +#tray > .passive { + -gtk-icon-effect: dim; +} + +#tray > .needs-attention { + -gtk-icon-effect: highlight; +} + +/** Right modules */ + +#battery, +#wireplumber, +#network { + padding: 0 ${outerGap}; +} + +/** Battery */ + +#battery.charging { + color: ${success}; +} + +#battery.warning:not(.charging) { + color: ${warning}; +} + +#battery.critical:not(.charging) { + color: ${error}; +} + +/** Wireplumber */ + +#wireplumber.muted { + color: ${error}; +} + +/** Network */ + +#network.wifi, +#network.ethernet { + color: ${success}; +} + +#network.disconnected { + color: ${error}; +} + +'' + |