Skip to content

Commit

Permalink
fix: waybar
Browse files Browse the repository at this point in the history
  • Loading branch information
raexera committed Oct 22, 2024
1 parent 5db18c7 commit 3a553c6
Showing 1 changed file with 13 additions and 21 deletions.
34 changes: 13 additions & 21 deletions home/modules/wayland/windowManager/hyprland/programs/waybar.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{pkgs, ...}: {
{pkgs, ...}: let
snowflake = builtins.fetchurl rec {
name = "Logo-${sha256}.svg";
url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/master/logo/nix-snowflake-colours.svg";
sha256 = "1cifj774r4z4m856fva1mamnpnhsjl44kw3asklrc57824f5lyz3";
};
in {
programs.waybar = {
enable = true;
systemd.enable = true;
Expand All @@ -16,12 +22,13 @@
margin-bottom = 0;
margin-left = 0;
margin-right = 0;
modules-left = ["custom/logo" "hyprland/workspaces" "hyprland/window"];
modules-left = ["image" "hyprland/workspaces" "hyprland/window"];
modules-center = ["custom/weather" "clock"];
modules-right = ["tray" "group/network-pulseaudio-backlight-battery" "group/powermenu"];

"custom/logo" = {
format = " ";
"image" = {
path = snowflake;
size = 32;
tooltip = false;
};

Expand Down Expand Up @@ -201,13 +208,7 @@
}
];

style = let
snowflake = builtins.fetchurl rec {
name = "Logo-${sha256}.svg";
url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/master/logo/nix-snowflake-colours.svg";
sha256 = "1cifj774r4z4m856fva1mamnpnhsjl44kw3asklrc57824f5lyz3";
};
in ''
style = ''
@define-color foreground #D8DEE9;
@define-color background #242933;
@define-color background-alt #2E3440;
Expand Down Expand Up @@ -317,7 +318,6 @@
}
/* Modules */
#custom-logo,
#workspaces,
#window,
#tray,
Expand All @@ -334,7 +334,7 @@
margin: 0.5rem 0.25rem;
}
#custom-logo,
#image,
#window,
#custom-weather,
#tray,
Expand Down Expand Up @@ -363,14 +363,6 @@
padding: 0.5rem;
}
/* Custom Logo */
#custom-logo {
background: transparent
url("${snowflake}")
center/2rem no-repeat;
min-width: 2rem;
}
/* Hyprland Workspaces */
#workspaces {
padding: 0.5rem 0.75rem;
Expand Down

0 comments on commit 3a553c6

Please sign in to comment.