From 59991e5b7d5dafdbff1ffe7aba2da25797044d2a Mon Sep 17 00:00:00 2001 From: Carlos Sousa Date: Wed, 11 Jun 2025 14:30:40 +0200 Subject: [PATCH] update waybar look and feel --- config/waybar/config.jsonc | 103 +++++++++++++++++-------- config/waybar/resources/power_menu.xml | 10 --- config/waybar/style.css | 4 +- 3 files changed, 73 insertions(+), 44 deletions(-) diff --git a/config/waybar/config.jsonc b/config/waybar/config.jsonc index ef0efad..9c8fb97 100644 --- a/config/waybar/config.jsonc +++ b/config/waybar/config.jsonc @@ -6,6 +6,7 @@ //"spacing": 4, // Gaps between modules (4px) // Choose the order of the modules "modules-left": [ + "clock", "hyprland/window" ], "modules-center": [ @@ -28,25 +29,30 @@ "battery", "battery#bat2", "tray", - "clock", "custom/power" ], // Modules configuration + "hyprland/window": { + "separate-outputs": false, + "icon": true, + "icon-size": 16 + }, "hyprland/workspaces": { //"disable-scroll": true, "all-outputs": true, "warp-on-scroll": false, //"format": "{name}: {icon}", - "format": "{name}: {icon}", + "format": "[{name}: {icon}]", + "format-window-separator": "\n", "format-icons": { "1": " Work", // Current Work / Task "2": " Docs", // Documentation "3": "🌐 Browser", // Browser - "4": " Term", // Console / Batch + "4": " Term", // Console / Batch "5": "🎮 Fun", // Fun / Leisure "6": " Comms", // Communication "7": "", - //"active": "", + "active": "", "urgent": "", "focused": "", "default": "" @@ -112,36 +118,69 @@ }, "tray": { // "icon-size": 21, - "s10pacing": 5 + "spacing": 5 }, "clock": { // "timezone": "America/New_York", "tooltip-format": "{:%Y %B}\n{calendar}", - "format-alt": "{:%Y-%m-%d}", - //"format": "{:L%Y-%m-%d [%a] %H:%M}" - "format": "{:%H:%M}", - "spacing": 5 + "format": "{:%a %H:%M}", + //"format": "{:L%Y-%m-%d [%a] %H:%M}", + "format-alt": "{:%H:%M [%a] [%d/%m/%Y]}", + "spacing": 5, + "calendar": { + "mode" : "year", + "mode-mon-col" : 3, + "weeks-pos" : "left", + "on-scroll" : 1, + "format": { + "months": "{}", + "days": "{}", + "weeks": "{}", + "weekdays": "{}", + "today": "{}" + } + }, + "actions": { + "on-click-right": "mode", + "on-scroll-up": "tz_up", + "on-scroll-down": "tz_down", + "on-scroll-up": "shift_up", + "on-scroll-down": "shift_down" + } }, "cpu": { - "format": " {usage}%", - "spacing": 5 -// "tooltip": false + "interval": 10, + "format": "[{usage}% {icon}]", + "format-icons": [ + "", // green + "", // blue + "", // white + "", // white + "", // yellow + "", // yellow + "", // orange + "" // red + ] }, "memory": { - "format": " {}%" + //"format": " {}%", + "interval": 30, + "format": "[{used:0.1f}G 🐏 {percentage}%]" }, "temperature": { "thermal-zone": 2, "hwmon-path": "/sys/class/hwmon/hwmon1/temp2_input", "critical-threshold": 80, - "format-critical": "{icon} {temperatureC}°C", - "format": "{icon} {temperatureC}°C", - "format-icons": ["", "", ""] + "format-critical": "{icon} {temperatureC}°C {icon}", + "format": "[{icon} {temperatureC}°C]", + "format-icons": ["❄️", "", "", "", "🔥"] }, "backlight": { // "device": "acpi_video1", "format": "{icon} {percent}%", - "format-icons": ["", "", "", "", "", "", "", "", ""] + "format-icons": ["", "", "", "", "", "", "", "", ""], + "interval": 10, + "scroll-step": 10 }, "battery": { "states": { @@ -162,19 +201,19 @@ }, "network": { // "interface": "wlp2*", // (Optional) To force the use of this interface - "format-wifi": "{essid} ({signalStrength}%) ", - "format-ethernet": " {ifname}", - "tooltip-format": " {ifname} via {gwaddr}", - "format-linked": " {ifname} (No IP)", - "format-disconnected": "Disconnected ⚠ {ifname}", - "format-alt": " {ifname}: {ipaddr}/{cidr}" + "format-wifi": "[{essid} ({signalStrength}%) ]", + "format-ethernet": "[🌐 {ifname}]", + "tooltip-format": "[🌐 {ifname} via {gwaddr}]", + "format-linked": "[🚫 {ifname} (No IP)]", + "format-disconnected": "[Disconnected ⚠ {ifname}]", + "format-alt": "[🌐 {ifname}: {ipaddr}/{cidr}]" }, "pulseaudio": { "scroll-step": 5, // %, can be a float - "format": "{icon} {volume}% {format_source}", - "format-bluetooth": " {icon} {volume}% {format_source}", - "format-bluetooth-muted": "  {icon} {format_source}", - "format-muted": " {format_source}", + "format": "[{icon} {volume}% {format_source} ]", + "format-bluetooth": "[ {icon} {volume}% {format_source} ]", + "format-bluetooth-muted": "[🔇  {icon} {format_source} ]", + "format-muted": "[🔇 {format_source} ]", "format-source": " {volume}%", "format-source-muted": "", "format-icons": { @@ -202,14 +241,14 @@ // "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name }, "power-profiles-daemon": { - "format": "{icon} ", + "format": "[{icon}]", "tooltip-format": "Power profile: {profile}\nDriver: {driver}", "tooltip": true, "format-icons": { - "default": "", - "performance": "", - "balanced": "", - "power-saver": "" + "default": "⚡", + "performance": "⚡", + "balanced": "⚖️", + "power-saver": "🔋" } }, "custom/power": { diff --git a/config/waybar/resources/power_menu.xml b/config/waybar/resources/power_menu.xml index aa2a42c..f3314dd 100644 --- a/config/waybar/resources/power_menu.xml +++ b/config/waybar/resources/power_menu.xml @@ -1,16 +1,6 @@ - - - Suspend - - - - - Hibernate - - Shutdown diff --git a/config/waybar/style.css b/config/waybar/style.css index bc47687..bc0d243 100644 --- a/config/waybar/style.css +++ b/config/waybar/style.css @@ -97,8 +97,8 @@ button:hover { #scratchpad, #mpd { margin: 2px; - padding-left: 4px; - padding-right: 4px; + padding-left: 2px; + padding-right: 2px; background-color: rgba(0,0,0,0.3); color: #ffffff; }