waybar new design on the right

This commit is contained in:
2026-06-16 02:19:05 +02:00
parent 7905ca167e
commit 5d39868542
2 changed files with 113 additions and 55 deletions

View File

@ -1,25 +1,55 @@
{ lib, ... }: { pkgs, lib, ... }:
{ {
programs.waybar.enable = true; programs.waybar.enable = true;
/*
.modules-right {
background-color: #1e1e2e;
padding-left: 10px;
padding-right: 10px;
padding-top: 5px;
padding-bottom: 5px;
border-radius: 10px;
}
*/
programs.waybar.style = '' programs.waybar.style = ''
* { * {
border: none;
border-radius: 0;
font-family: "Iosevka Nerd Font"; font-family: "Iosevka Nerd Font";
font-size: 15px; font-size: 14px;
min-height: 0; }
.modules-right {
border: 1px solid #444444;
background-color: #1e1e2e;
padding-left: 10px;
padding-right: 10px;
padding-top: 3px;
padding-bottom: 3px;
border-radius: 10px;
} }
window#waybar { .modules-right .module {
background: transparent; margin-left: 4px;
color: white; margin-right: 4px;
background-color: rgba(127, 132, 156, 0.3);
padding: 1px 6px;
border-radius: 5px;
color: #cdd6f4;
transition: background-color 200ms ease;
} }
#window { #window {
font-weight: bold; font-weight: bold;
} }
#custom-separator {
background-color: transparent;
margin: 0px;
padding: 0px
}
#workspaces button { #workspaces button {
padding: 0 5px; padding: 0 5px;
background: transparent; background: transparent;
@ -36,30 +66,29 @@
color : #88ff88; color : #88ff88;
background-color : rgba(220,255, 220, 0.3) background-color : rgba(220,255, 220, 0.3)
} }
#mode { #network {
background: #64727D; background-color: transparent;
border-bottom: 3px solid white; }
}
#clock {
background-color: transparent;
}
#network.disconnected { #network.disconnected {
color: #f53c3c; color: #f53c3c;
font-weight:bold; font-weight:bold;
} }
#temperature.critical {
color: #ff2222;
}
#battery.critical { .module.warning {
color: #ff2222; background-color: rgba(249, 226, 175, 0.4);
} color: #ffffff;
#cpu.high { }
color: #ff2222;
} .module.high, .module.critical {
#disk.high { background-color: rgba(193,89,118, 0.5);
color: #ff2222; color: #ffffff;
} }
''; '';
programs.waybar.settings.mainBar = { programs.waybar.settings.mainBar = {
@ -70,8 +99,12 @@
margin-right = 5; margin-right = 5;
modules-left = ["hyprland/workspaces" "custom/music"]; modules-left = ["hyprland/workspaces" "custom/music"];
modules-center = ["hyprland/window"]; modules-center = ["hyprland/window"];
modules-right = ["disk" "pulseaudio" "network" "custom/pipe" "cpu" "custom/pipe" "temperature" "custom/pipe" "memory" "battery" "clock"]; modules-right = ["disk" "pulseaudio" "cpu" "temperature" "memory" "battery" "network" "custom/separator" "clock"];
"hyprland/window" = {
max-length = 50;
};
"hyprland/workspaces" = { "hyprland/workspaces" = {
disable-scroll = true; disable-scroll = true;
all-outputs = false; all-outputs = false;
@ -80,46 +113,59 @@
clock = { clock = {
interval = 1; interval = 1;
format-alt = " {:%Y-%m-%d}"; format-alt = "{:%Y-%m-%d}";
format = " {:%H:%M:%S}"; format = "{:%H:%M:%S}";
}; };
cpu = { cpu = {
format = " {usage}% "; format = " {usage}%";
states.high = 80; format-low = "";
interval = 5; states = {
low = 0;
working = 20;
high = 80;
};
interval = 5;
}; };
memory = { memory = {
format = " {}% |"; format = " {}%";
format-low = "";
interval = 5; interval = 5;
states = {
low = 0;
show = 50;
elevated = 80;
critical = 95;
};
}; };
battery = { battery = {
bat = "BAT0"; bat = "BAT0";
full-at = 79; full-at = 79;
states = { states = {
good = 20; good = 20;
critical = 15; critical = 15;
}; };
format-time = " {H}:{m}"; format-time = " {H}:{m}";
format-discharging = " {icon} {capacity}%{time} |"; format-discharging = "{icon} {capacity}%{time}";
format-charging = " {capacity}%{time} |"; format-charging = " {capacity}%{time}";
format-plugged = ""; format-plugged = "";
format-icons = [" " " " " " " " " "]; format-icons = [" " " " " " " " " "];
interval = 10; interval = 10;
}; };
network = { network = {
format-wifi = " {icon} {essid} "; format-wifi = "{icon} {essid}";
format-ethernet = " {ifname}: {ipaddr}/{cidr} "; format-ethernet = "󰈁 {ifname}";
format-disconnected = " Disconnected "; format-disconnected = " Disconnected";
format-icons =["󰤟 " "󰤢 " "󰤥 " "󰤨 "]; format-icons = ["󰤟 " "󰤢 " "󰤥 " "󰤨 "];
max-length = 20;
}; };
pulseaudio = { pulseaudio = {
format = " {icon}{volume}% |"; format = "{icon}{volume}%";
format-bluetooth = " {icon} {volume}% |"; format-bluetooth = " {icon} {volume}%";
format-muted = ""; format-muted = "";
format-icons = { format-icons = {
headphones = " "; headphones = " ";
@ -130,31 +176,43 @@
car = " "; car = " ";
default = [" " " " " "]; default = [" " " " " "];
}; };
on-click = "pavucontrol"; on-click = "${pkgs.pavucontrol}/bin/pavucontrol";
states = {
low = 79;
warning = 99;
high = 100000;
};
}; };
temperature = { temperature = {
thermal-zone = lib.mkDefault 0; thermal-zone = lib.mkDefault 0;
critical-threshold = lib.mkDefault 80; critical-threshold = lib.mkDefault 85;
warning-threshold = lib.mkDefault 60;
interval = 5; interval = 5;
format =" {icon} {temperatureC}°C "; format = "";
format-warning ="{icon} {temperatureC}°C";
format-critical ="{icon} {temperatureC}°C";
format-icons = ["" "" "" "" ""]; format-icons = ["" "" "" "" ""];
}; };
disk = { disk = {
format =" 󰋊 {percentage_used}% |"; format-low ="";
states.high = "5"; format = "󰋊 {percentage_used}%";
states.low = 0;
states.warning = 20;
states.high= 30;
}; };
"custom/pipe" = { "custom/separator" = {
format = "|"; format = "|";
}; };
"custom/music" = { "custom/music" = {
exec-if = "playerctl metadata 2>&1 >/dev/null"; exec-if = "playerctl metadata 2>&1 >/dev/null";
exec = "playerctl metadata --format ' {{ artist }} - {{title}}'"; exec = "playerctl metadata --format ' {{ artist }} - {{title}}'";
interval = 1; interval = 1;
interval-if = 5; interval-if = 5;
max-length = 50;
}; };
}; };

View File

@ -5,7 +5,7 @@
modules-right = lib.mkBefore ["custom/fans" "custom/dgpu"]; modules-right = lib.mkBefore ["custom/fans" "custom/dgpu"];
"custom/dgpu" = { "custom/dgpu" = {
exec-if = "test \"$(supergfxctl -g)\" = \"Hybrid\" || test \"$(supergfxctl -g)\" = \"Vfio\""; exec-if = "test \"$(supergfxctl -g)\" = \"Hybrid\" || test \"$(supergfxctl -g)\" = \"Vfio\"";
exec = "echo \" on |\""; exec = "echo \" 󰾲 on |\"";
interval-if = 10; interval-if = 10;
interval = 100; interval = 100;
}; };