From 1235ffe614ab03a34618646224cacfdc2c8b9def Mon Sep 17 00:00:00 2001
From: Noratrieb <48135649+Noratrieb@users.noreply.github.com>
Date: Mon, 7 Apr 2025 19:01:32 +0200
Subject: [PATCH] bar??
---
home-manager/waybar.nix | 130 ++++++++++++++++++++--------------------
nixos/configuration.nix | 1 +
2 files changed, 66 insertions(+), 65 deletions(-)
diff --git a/home-manager/waybar.nix b/home-manager/waybar.nix
index 750dd6f..7252dac 100644
--- a/home-manager/waybar.nix
+++ b/home-manager/waybar.nix
@@ -1,73 +1,73 @@
-{ ... }: {
- programs.waybar.enable = true;
- programs.waybar.settings = {
- mainBar = {
- height = 35;
- spacing = 4;
- modules-left = [ ];
- modules-center = [
- "clock"
- ];
- modules-right = [
- "privacy"
- "pulseaudio"
- "cpu"
- "memory"
- "tray"
- ];
- clock = {
- format = "{:%a %F %H:%M}";
- "tooltip-format" = "{calendar}";
- "calendar" = {
- "mode" = "year";
- "mode-mon-col" = 3;
- "weeks-pos" = "right";
- "on-scroll" = 1;
- "format" = {
- "months" = "{}";
- "days" = "{}";
- "weeks" = "W{}";
- "weekdays" = "{}";
- "today" = "{}";
+{ config, ... }: {
+ home.file."${config.xdg.configHome}/waybar/config.jsonc" = {
+ text =
+ builtins.toJSON {
+ height = 35;
+ spacing = 4;
+ modules-left = [ ];
+ modules-center = [
+ "clock"
+ ];
+ modules-right = [
+ "privacy"
+ "pulseaudio"
+ "cpu"
+ "memory"
+ "tray"
+ ];
+ clock = {
+ format = "{:%a %F %H:%M}";
+ "tooltip-format" = "{calendar}";
+ "calendar" = {
+ "mode" = "year";
+ "mode-mon-col" = 3;
+ "weeks-pos" = "right";
+ "on-scroll" = 1;
+ "format" = {
+ "months" = "{}";
+ "days" = "{}";
+ "weeks" = "W{}";
+ "weekdays" = "{}";
+ "today" = "{}";
+ };
+ };
+ "actions" = {
+ "on-click-right" = "mode";
+ "on-scroll-up" = "shift_up";
+ "on-scroll-down" = "shift_down";
};
};
- "actions" = {
- "on-click-right" = "mode";
- "on-scroll-up" = "shift_up";
- "on-scroll-down" = "shift_down";
+ pulseaudio = {
+ # "scroll-step": 1, // %, can be a float
+ "format" = "{volume}% {icon} {format_source}";
+ "format-bluetooth" = "{volume}% {icon} {format_source}";
+ "format-bluetooth-muted" = " {icon} {format_source}";
+ "format-muted" = " {format_source}";
+ "format-source" = "{volume}% ";
+ "format-source-muted" = "";
+ "format-icons" = {
+ "headphone" = "";
+ "hands-free" = "";
+ "headset" = "";
+ "phone" = "";
+ "portable" = "";
+ "car" = "";
+ "default" = [ "" "" "" ];
+ };
+ "on-click" = "pavucontrol";
};
- };
- pulseaudio = {
- # "scroll-step": 1, // %, can be a float
- "format" = "{volume}% {icon} {format_source}";
- "format-bluetooth" = "{volume}% {icon} {format_source}";
- "format-bluetooth-muted" = " {icon} {format_source}";
- "format-muted" = " {format_source}";
- "format-source" = "{volume}% ";
- "format-source-muted" = "";
- "format-icons" = {
- "headphone" = "";
- "hands-free" = "";
- "headset" = "";
- "phone" = "";
- "portable" = "";
- "car" = "";
- "default" = [ "" "" "" ];
+
+ cpu = {
+ format = "{usage}% ";
+ tooltip = false;
+ };
+ memory = {
+ format = "{}% ";
+ };
+ tray = {
+ spacing = 10;
};
- "on-click" = "pavucontrol";
- };
- cpu = {
- format = "{usage}% ";
- tooltip = false;
};
- memory = {
- format = "{}% ";
- };
- tray = {
- spacing = 10;
- };
-
- };
};
}
diff --git a/nixos/configuration.nix b/nixos/configuration.nix
index 1530c74..ed5fad5 100644
--- a/nixos/configuration.nix
+++ b/nixos/configuration.nix
@@ -179,6 +179,7 @@ in
};
services.displayManager.enable = true;
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-gnome pkgs.gnome-keyring ];
+ programs.waybar.enable = true;
# TODO: Create a fancontrol config
hardware.fancontrol.enable = false;