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"
], ],
@ -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,8 +132,8 @@
"4:terminals": "", // Icon: terminal "4:terminals": "", // Icon: terminal
"5:portal": "", // Icon: terminal "5:portal": "", // Icon: terminal
"urgent": "", "urgent": "",
"focused": "", "focused": "",
"default": "" "default": ""
} }
}, },

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,35 +36,35 @@
@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 */
* { * {
@ -85,7 +85,6 @@
/* Each module */ /* Each module */
#battery, #battery,
#clock,
#cpu, #cpu,
#custom-keyboard-layout, #custom-keyboard-layout,
#memory, #memory,
@ -94,14 +93,25 @@
#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;
@ -203,9 +213,6 @@
} }
#workspaces button { #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-left: 10px;
padding-right: 10px; padding-right: 10px;
color: @subtext1; color: @subtext1;
@ -214,18 +221,15 @@
#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;
} }