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

View File

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