From 181fbf50f8ece7264a566c7aef0db163f0c71d7e Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Thu, 25 Apr 2024 22:42:26 -0400 Subject: [PATCH] waybar: new groups and custom config for hyprland --- homeManagerModules/apps/waybar/default.nix | 10 ++++---- homeManagerModules/desktop/hypr/default.nix | 4 ++- homeManagerModules/desktop/hypr/waybar.css | 27 +++++++++++++++++++++ 3 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 homeManagerModules/desktop/hypr/waybar.css diff --git a/homeManagerModules/apps/waybar/default.nix b/homeManagerModules/apps/waybar/default.nix index 391fb736..772c9935 100644 --- a/homeManagerModules/apps/waybar/default.nix +++ b/homeManagerModules/apps/waybar/default.nix @@ -28,11 +28,7 @@ modules-center = ["clock"]; modules-right = [ "tray" - "bluetooth" - "pulseaudio" - "power-profiles-daemon" - "battery" - "custom/logout" + "group/hardware" ]; "hyprland/workspaces" = { "all-outputs" = true; @@ -149,6 +145,10 @@ "power-saver" = "󰌪"; }; }; + "group/hardware" = { + "orientation" = "horizontal"; + modules = ["bluetooth" "pulseaudio" "power-profiles-daemon" "battery" "custom/logout"]; + }; }; }; }; diff --git a/homeManagerModules/desktop/hypr/default.nix b/homeManagerModules/desktop/hypr/default.nix index 1652d593..1d60bed0 100644 --- a/homeManagerModules/desktop/hypr/default.nix +++ b/homeManagerModules/desktop/hypr/default.nix @@ -71,6 +71,8 @@ extraPortals = [pkgs.xdg-desktop-portal-hyprland]; }; + xdg.configFile."waybar/hyprland-style.css".source = ./waybar.css; + programs.waybar.settings = { mainBar = { modules-left = ["hyprland/workspaces" "hyprland/submap"]; @@ -89,7 +91,7 @@ terminal = pkgs.alacritty + "/bin/alacritty"; # Hyprland desktop utilities - bar = pkgs.waybar + "/bin/waybar"; + bar = pkgs.waybar + "/bin/waybar -s ${config.xdg.configHome}/waybar/hyprland-style.css"; launcher = pkgs.fuzzel + "/bin/fuzzel"; notifyd = pkgs.mako + "/bin/mako"; wallpaperd = pkgs.hyprpaper + "/bin/hyprpaper"; diff --git a/homeManagerModules/desktop/hypr/waybar.css b/homeManagerModules/desktop/hypr/waybar.css new file mode 100644 index 00000000..da882ea1 --- /dev/null +++ b/homeManagerModules/desktop/hypr/waybar.css @@ -0,0 +1,27 @@ +@import url("style.css"); + +/* Style overrides for sway */ + +window#waybar { + background: rgba (35, 38, 52, 0.0); +} + +#workspaces, +#submap, +#tray, +#clock, +#hardware +{ +border-radius: 10; +background: rgba (35, 38, 52, 0.8); +margin: 5px 10px 0px 10px; +padding: 0px 10px 0px 10px; +} + +#clock { + padding: 0px 20px 0px 20px; +} + +/* #workspaces { + padding: 0px 5px; +} */ \ No newline at end of file