Update waybar config

This commit is contained in:
Václav Uruba 2025-06-13 20:42:36 +02:00
parent bb10cc6709
commit aac52d85fe
Signed by: uruba
GPG Key ID: 9D8E987C4B2E1E9C
2 changed files with 103 additions and 99 deletions

View File

@ -16,16 +16,14 @@
"position": "top", "position": "top",
// If height property would be not present, it'd be calculated dynamically // If height property would be not present, it'd be calculated dynamically
"height": 30, "height": 22,
"modules-left": [ "modules-left": [
"sway/workspaces", "sway/window"
"sway/mode"
], ],
"modules-center": [ "modules-center": [
// "sway/window" "sway/workspaces",
"clock#date", "sway/mode"
"clock#time"
], ],
"modules-right": [ "modules-right": [
"network", "network",
@ -35,7 +33,9 @@
"temperature", "temperature",
"custom/keyboard-layout", "custom/keyboard-layout",
"battery", "battery",
"tray" "tray",
"clock#date",
"clock#time"
], ],
@ -96,7 +96,7 @@
"memory": { "memory": {
"interval": 5, "interval": 5,
"format": " {}%", // Icon: memory "format": " {}%", // Icon: memory
"states": { "states": {
"warning": 70, "warning": 70,
"critical": 90 "critical": 90
@ -124,7 +124,7 @@
"sway/workspaces": { "sway/workspaces": {
"all-outputs": false, "all-outputs": false,
"disable-scroll": true, "disable-scroll": true,
"format": "{icon} {name}", "format": "{name}",
"format-icons": { "format-icons": {
"1:www": "龜", // Icon: firefox-browser "1:www": "龜", // Icon: firefox-browser
"2:mail": "", // Icon: mail "2:mail": "", // Icon: mail
@ -132,14 +132,14 @@
"4:terminals": "", // Icon: terminal "4:terminals": "", // Icon: terminal
"5:portal": "", // Icon: terminal "5:portal": "", // Icon: terminal
"urgent": "", "urgent": "",
"focused": "", "focused": "",
"default": "" "default": ""
} }
}, },
"pulseaudio": { "pulseaudio": {
//"scroll-step": 1, //"scroll-step": 1,
"format": "{icon} {volume}%", "format": "{icon} {volume}%",
"format-bluetooth": "{icon} {volume}%", "format-bluetooth": "{icon} {volume}%",
"format-muted": "", "format-muted": "",
"format-icons": { "format-icons": {
@ -158,7 +158,7 @@
"hwmon-path": "/sys/class/hwmon/hwmon4/temp1_input", "hwmon-path": "/sys/class/hwmon/hwmon4/temp1_input",
"critical-threshold": 80, "critical-threshold": 80,
"interval": 5, "interval": 5,
"format": "{icon} {temperatureC}°C", "format": "{icon} {temperatureC}°C",
"format-icons": [ "format-icons": [
"", // Icon: temperature-empty "", // Icon: temperature-empty
"", // Icon: temperature-quarter "", // Icon: temperature-quarter

View File

@ -1,12 +1,12 @@
/* ============================================================================= /* =============================================================================
* *
* Waybar configuration * Waybar configuration
* *
* =========================================================================== */ * =========================================================================== */
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* Keyframes * Keyframes
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
@define-color rosewater #f5e0dc; @define-color rosewater #f5e0dc;
@define-color flamingo #f2cdcd; @define-color flamingo #f2cdcd;
@ -36,56 +36,55 @@
@define-color crust #11111b; @define-color crust #11111b;
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* Keyframes * Keyframes
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
@keyframes blink-warning { @keyframes blink-warning {
70% { 70% {
color: @lavender; color: @lavender;
} }
to { to {
color: @lavender; color: @lavender;
background-color: orange; background-color: orange;
} }
} }
@keyframes blink-critical { @keyframes blink-critical {
70% { 70% {
color: @lavender; color: @lavender;
} }
to { to {
color: @lavender; color: @lavender;
background-color: red; background-color: red;
} }
} }
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* Base styles * Base styles
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
/* Reset all styles */ /* Reset all styles */
* { * {
border: none; border: none;
border-radius: 0; border-radius: 0;
min-height: 0; min-height: 0;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
/* The whole bar */ /* The whole bar */
#waybar { #waybar {
background: @base; background: @base;
color: @text; color: @text;
font-family: UbuntuMono Nerd Font, Noto Sans, sans-serif; font-family: UbuntuMono Nerd Font, Noto Sans, sans-serif;
font-size: 16px; font-size: 16px;
} }
/* Each module */ /* Each module */
#battery, #battery,
#clock,
#cpu, #cpu,
#custom-keyboard-layout, #custom-keyboard-layout,
#memory, #memory,
@ -94,41 +93,52 @@
#pulseaudio, #pulseaudio,
#temperature, #temperature,
#tray { #tray {
padding-left: 10px; padding-right: 14px;
padding-right: 10px; }
#clock.date {
padding-right: 8px;
}
#clock.time {
padding-right: 8px;
}
#window {
padding-left: 8px;
} }
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* Module styles * Module styles
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
#battery { #battery {
animation-timing-function: linear; animation-timing-function: linear;
animation-iteration-count: infinite; animation-iteration-count: infinite;
animation-direction: alternate; animation-direction: alternate;
} }
#battery.warning { #battery.warning {
color: orange; color: orange;
} }
#battery.critical { #battery.critical {
color: red; color: red;
} }
#battery.warning.discharging { #battery.warning.discharging {
animation-name: blink-warning; animation-name: blink-warning;
animation-duration: 3s; animation-duration: 3s;
} }
#battery.critical.discharging { #battery.critical.discharging {
animation-name: blink-critical; animation-name: blink-critical;
animation-duration: 2s; animation-duration: 2s;
} }
#clock { #clock {
font-weight: bold; font-weight: bold;
} }
#cpu { #cpu {
@ -136,96 +146,90 @@
} }
#cpu.warning { #cpu.warning {
color: orange; color: orange;
} }
#cpu.critical { #cpu.critical {
color: @red; color: @red;
} }
#memory { #memory {
animation-timing-function: linear; animation-timing-function: linear;
animation-iteration-count: infinite; animation-iteration-count: infinite;
animation-direction: alternate; animation-direction: alternate;
} }
#memory.warning { #memory.warning {
color: orange; color: orange;
} }
#memory.critical { #memory.critical {
color: @red; color: @red;
animation-name: blink-critical; animation-name: blink-critical;
animation-duration: 2s; animation-duration: 2s;
} }
#mode { #mode {
background: #64727D; background: #64727D;
border-top: 2px solid white; border-top: 2px solid white;
/* To compensate for the top border and still have vertical centering */ /* To compensate for the top border and still have vertical centering */
padding-bottom: 2px; padding-bottom: 2px;
} }
#network { #network {
/* No styles */ /* No styles */
} }
#network.disconnected { #network.disconnected {
color: orange; color: orange;
} }
#pulseaudio { #pulseaudio {
/* No styles */ /* No styles */
} }
#pulseaudio.muted { #pulseaudio.muted {
/* No styles */ /* No styles */
} }
#custom-spotify { #custom-spotify {
color: rgb(102, 220, 105); color: rgb(102, 220, 105);
} }
#temperature { #temperature {
/* No styles */ /* No styles */
} }
#temperature.critical { #temperature.critical {
color: red; color: red;
} }
#tray { #tray {
/* No styles */ /* No styles */
} }
#window { #window {
font-weight: bold; font-weight: bold;
} }
#workspaces button { #workspaces button {
border-top: 2px solid transparent; padding-left: 10px;
/* To compensate for the top border and still have vertical centering */ padding-right: 10px;
padding-bottom: 2px; color: @subtext1;
padding-left: 10px;
padding-right: 10px;
color: @subtext1;
} }
#workspaces button:hover { #workspaces button:hover {
color: @text; color: @text;
background: @surface2; background: @surface2;
border-color: @text; text-shadow: none; /* Remove predefined text-shadow */
text-shadow: none; /* Remove predefined text-shadow */ transition: none; /* Disable predefined animations */
transition: none; /* Disable predefined animations */
} }
#workspaces button.focused { #workspaces button.focused {
border-color: @surface2; color: @text;
color: @text; background-color: @surface0;
background-color: @surface0;
} }
#workspaces button.urgent { #workspaces button.urgent {
border-color: @red; color: @red;
color: @red;
} }