This commit is contained in:
2025-07-10 17:27:36 +02:00
parent 9675f12e5e
commit 5b2b64611e
3 changed files with 20 additions and 191 deletions
+19 -22
View File
@@ -1,12 +1,10 @@
{ config, lib, pkgs, ... }:
{
home.packages = with pkgs; [
waybar
];
programs.waybar = {
enable = true;
settings = {
mainBar = {
settings = [{
layer = "top";
position = "top";
"modules-left" = [
@@ -28,11 +26,11 @@
"battery"
"clock"
];
margin = null;
spacing = 15;
reload_style_on_change = true;
"clock" = {
format = "{:%a %d.%m.%y | Week: %U | %T}";
interval = 1;
@@ -43,30 +41,30 @@
format-calendar-weeks = "<span color='#aeaeae'><b>W{:%V}</b></span>";
format-calendar-weekdays = "<span color='#aeaeae'><b>{}</b></span>";
};
"disk" = {
interval = 30;
format = " {percentage_used}% {free:2} free";
path = "/";
};
"memory" = {
format = " {percentage}% {used:.1f}/{total:.1f} S: {swapUsed:.1f}/{swapTotal:.1f}";
};
"custom/cpu_linux" = {
exec = "~/.config/waybar/scripts/cpu_linux.sh";
"return-type" = "json";
interval = 2;
format = ": {text}%";
};
"custom/nvidia" = {
exec = "nvidia-smi --query-gpu=utilization.gpu,temperature.gpu --format=csv,nounits,noheader | sed 's/\\([0-9]\\+\\), \\([0-9]\\+\\)/\\1% @ \\2°C/g'";
format = " {}";
interval = 4;
};
"temperature" = {
format = " {temperatureC}°C";
hwmon-path = "/sys/devices/platform/coretemp.0/hwmon/hwmon7/temp1_input";
@@ -75,12 +73,12 @@
critical-threshold = 80;
on-click = "psensor";
};
"tray" = {
icon-size = 14;
spacing = 5;
};
"idle_inhibitor" = {
format = "<span font='12'>{icon}</span>";
format-icons = {
@@ -88,7 +86,7 @@
deactivated = "󰅶";
};
};
"bluetooth" = {
format-on = "󰂰";
format-off = "";
@@ -101,7 +99,7 @@
tooltip-format-enumerate-connected-battery = "{device_alias}\t{device_address}\t{device_battery_percentage}%";
on-click = "rofi-bluetooth";
};
"pulseaudio" = {
format = "{volume}% {icon}";
format-bluetooth = "󰂰";
@@ -124,7 +122,7 @@
on-scroll-up = "pactl set-sink-volume @DEFAULT_SINK@ +5%";
on-scroll-down = "pactl set-sink-volume @DEFAULT_SINK@ -5%";
};
"pulseaudio#mic" = {
format = "{format_source}";
format-source = "";
@@ -134,17 +132,17 @@
on-scroll-down = "pactl set-source-volume 1 -1%";
on-scroll-up = "pactl set-source-volume 1 +1%";
};
"group/audio" = {
orientation = "horizontal";
modules = [ "pulseaudio" "pulseaudio#mic" ];
};
"group/networking" = {
orientation = "horizontal";
modules = [ "network" "network#speed" ];
};
network = {
format-wifi = " {essid}";
format-ethernet = "󰈀";
@@ -155,7 +153,7 @@
tooltip-format-disconnected = "Not Connected";
on-click = "networkmanager_dmenu";
};
"network#speed" = {
format = "󰁅 {bandwidthDownBits:20} 󰁝 {bandwidthUpBits:20}";
interval = 1;
@@ -166,7 +164,7 @@
tooltip-format-disconnected = "Not Connected";
on-click = "networkmanager_dmenu";
};
"battery" = {
interval = 4;
states = {
@@ -184,7 +182,6 @@
"󰪢" "󰪣" "󰪤" "󰪥"
];
};
};
};
}];
};
}