summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.lock17
-rw-r--r--flake.nix4
-rw-r--r--modules/home-manager/waybar.nix130
3 files changed, 146 insertions, 5 deletions
diff --git a/flake.lock b/flake.lock
index b51d2bb..19cceb2 100644
--- a/flake.lock
+++ b/flake.lock
@@ -145,6 +145,22 @@
"type": "github"
}
},
+ "catppuccin-waybar": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1720870206,
+ "narHash": "sha256-za0y6hcN2rvN6Xjf31xLRe4PP0YyHu2i454ZPjr+lWA=",
+ "owner": "catppuccin",
+ "repo": "waybar",
+ "rev": "ee8ed32b4f63e9c417249c109818dcc05a2e25da",
+ "type": "github"
+ },
+ "original": {
+ "owner": "catppuccin",
+ "repo": "waybar",
+ "type": "github"
+ }
+ },
"disko": {
"inputs": {
"nixpkgs": [
@@ -891,6 +907,7 @@
"catppuccin-helix": "catppuccin-helix",
"catppuccin-hyprland": "catppuccin-hyprland",
"catppuccin-starship": "catppuccin-starship",
+ "catppuccin-waybar": "catppuccin-waybar",
"disko": "disko",
"home-manager": "home-manager",
"hugo-congo": "hugo-congo",
diff --git a/flake.nix b/flake.nix
index 73d842e..2d5ce83 100644
--- a/flake.nix
+++ b/flake.nix
@@ -137,6 +137,10 @@
url = "github:catppuccin/hyprland";
flake = false;
};
+ catppuccin-waybar = {
+ url = "github:catppuccin/waybar";
+ flake = false;
+ };
# # the nixConfig here only affects the flake inself, not the system configuration!
diff --git a/modules/home-manager/waybar.nix b/modules/home-manager/waybar.nix
index c35bc75..a66aff3 100644
--- a/modules/home-manager/waybar.nix
+++ b/modules/home-manager/waybar.nix
@@ -1,16 +1,136 @@
-{ config, ... }: {
+{ config, inputs, ... }: {
+ xdg.configFile."waybar/themes".source = "${inputs.catppuccin-waybar}/themes";
programs.waybar = {
enable = true;
systemd.enable = true;
systemd.target = "hyprland-session.target";
+ style = ''
+ @import "themes/mocha.css";
+
+ * {
+ font-family: FantasqueSansMono Nerd Font;
+ font-size: 17px;
+ min-height: 0;
+ }
+
+ #waybar {
+ background: transparent;
+ color: @text;
+ margin: 5px 5px;
+ }
+
+ #workspaces {
+ border-radius: 1rem;
+ margin: 5px;
+ background-color: @surface0;
+ margin-left: 1rem;
+ }
+
+ #workspaces button {
+ color: @lavender;
+ border-radius: 1rem;
+ padding: 0.4rem;
+ }
+
+ #workspaces button.active {
+ color: @sky;
+ border-radius: 1rem;
+ }
+
+ #workspaces button:hover {
+ color: @sapphire;
+ border-radius: 1rem;
+ }
+
+ #tray,
+ #clock,
+ #idle_inhibitor
+ #battery,
+ #pulseaudio,
+ #bluetooth,
+ #network,
+ #cpu,
+ #temperature,
+ #memory {
+ background-color: @surface0;
+ padding: 0.25rem 0.5rem;
+ margin: 5px 0;
+ }
+
+ #clock {
+ color: @blue;
+ border-radius: 1rem 1rem 1rem 1rem;
+ margin-right: 1rem;
+ }
+
+ #idle_inhibitor {
+ color: @peach;
+ border-radius: 0px 1rem 1rem 0px;
+ }
+
+ #battery {
+ color: @teal;
+ }
+
+ #battery.charging {
+ color: @green;
+ }
+
+ #battery.warning:not(.charging) {
+ color: @red;
+ }
+
+ #backlight {
+ color: @yellow;
+ }
+
+ #backlight, #battery {
+ border-radius: 0;
+ }
+
+ #pulseaudio {
+ color: @maroon;
+ border-radius: 1rem 0px 0px 1rem;
+ margin-left: 1rem;
+ }
+
+ #bluetooth {
+ color: @sapphire;
+ }
+
+ #network {
+ color: @lavender;
+ }
+
+ #cpu {
+ color: @blue;
+ border-radius: 1rem 0px 0px 1rem;
+ }
+
+ #temperature {
+ color: @yellow;
+ }
+
+ #memory {
+ color: @sky;
+ border-radius: 0px 1rem 1rem 0px;
+ margin-right: 1rem;
+ }
+
+
+ #tray {
+ margin-right: 1rem;
+ border-radius: 1rem;
+ }
+ '';
settings = {
mainBar = {
layer = "top";
position = "top";
- height = 40;
+ height = 48;
modules-left = [ "hyprland/workspaces" ];
- modules-center = [ "clock" ];
- modules-right = [ "idle_inhibitor" "pulseaudio" "bluetooth" "network" "backlight/slider" "battery" "cpu" "temperature" "memory" "keyboard_state" "tray" ];
+ modules-center = [ "clock" "backlight/slider" "idle_inhibitor" ];
+ modules-right = [ "pulseaudio" "bluetooth" "network" "battery" "cpu" "temperature" "memory" "tray" ];
"tray" = {
icon-size = 21;
@@ -119,7 +239,7 @@
format = "{temperatureC}°C ";
};
"keyboard-state" = {
- numlock = true;
+ # numlock = true;
capslock = true;
"format" = {
numlock = "N {icon}";