waybar: migrate to font modules

This commit is contained in:
Aly Raffauf 2024-08-07 22:01:55 -04:00
parent c25993a37f
commit ada438f374

View file

@ -3,8 +3,10 @@
lib, lib,
pkgs, pkgs,
... ...
}: { }: let
config = lib.mkIf config.ar.home.services.waybar.enable { cfg = config.ar.home;
in {
config = lib.mkIf cfg.services.waybar.enable {
programs.waybar = { programs.waybar = {
enable = true; enable = true;
@ -15,11 +17,11 @@
output = ["*"]; output = ["*"];
position = "top"; position = "top";
modules-left = modules-left =
lib.optionals (config.ar.home.desktop.hyprland.enable) lib.optionals (cfg.desktop.hyprland.enable)
["hyprland/workspaces" "hyprland/submap"] ["hyprland/workspaces" "hyprland/submap"]
++ lib.optionals (config.ar.home.desktop.sway.enable) ++ lib.optionals (cfg.desktop.sway.enable)
["sway/workspaces" "sway/scratchpad" "sway/mode"] ["sway/workspaces" "sway/scratchpad" "sway/mode"]
++ lib.optionals (config.ar.home.desktop.hyprland.tabletMode.enable) ++ lib.optionals (cfg.desktop.hyprland.tabletMode.enable)
["custom/menu" "custom/hyprland-close"]; ["custom/menu" "custom/hyprland-close"];
modules-center = ["clock"]; modules-center = ["clock"];
@ -256,25 +258,25 @@
* { * {
border: none; border: none;
border-radius: 0px; border-radius: 0px;
font-family: "UbuntuSansMono Nerd Font"; font-family: "${cfg.theme.monospaceFont.name}";
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: 600;
} }
window#waybar { window#waybar {
background: rgba (35, 38, 52, 0.0); background: rgba (35, 38, 52, 0.0);
color: ${config.ar.home.theme.colors.text}; color: ${cfg.theme.colors.text};
} }
#workspaces button { #workspaces button {
padding: 0px 5px; padding: 0px 5px;
margin: 0px 0px; margin: 0px 0px;
color: ${config.ar.home.theme.colors.text}; color: ${cfg.theme.colors.text};
} }
#workspaces button.active, #workspaces button.active,
#workspaces button.focused { #workspaces button.focused {
color: ${config.ar.home.theme.colors.primary}; color: ${cfg.theme.colors.primary};
} }
#clock, #clock,
@ -294,11 +296,11 @@
} }
#battery { #battery {
color: ${config.ar.home.theme.colors.text}; color: ${cfg.theme.colors.text};
} }
#battery.charging { #battery.charging {
color: ${config.ar.home.theme.colors.primary}; color: ${cfg.theme.colors.primary};
} }
#battery.critical:not(.charging), #battery.critical:not(.charging),
@ -328,7 +330,7 @@
#submap, #submap,
#mode { #mode {
color: ${config.ar.home.theme.colors.text}; color: ${cfg.theme.colors.text};
background: rgba(255, 123, 99, 0.8); background: rgba(255, 123, 99, 0.8);
} }
''; '';