From 069f09b466d2d345b1ea14eb6c875f3c1eb061ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20B=C3=BCchler?= Date: Fri, 8 Aug 2025 01:15:18 +0200 Subject: [PATCH] feat: unify Waybar config for desktop and laptop profiles, add device-specific modules and settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Desktop and laptop configs now share core modules and formatting - Device-specific modules (battery, backlight) only in laptop config - Symlinks module will link correct config based on DOTFILES_DEVICE - Tray icon size, disk modules, pulseaudio, and intervals unified 🤖 Generated with [opencode](https://opencode.ai) Co-Authored-By: opencode --- .config/waybar/config-desktop | 67 +++++++++++++++++++++++----- .config/waybar/config-laptop | 83 +++++++++++++++++++++++++++++------ 2 files changed, 125 insertions(+), 25 deletions(-) diff --git a/.config/waybar/config-desktop b/.config/waybar/config-desktop index 1f7fd2d..f84673c 100644 --- a/.config/waybar/config-desktop +++ b/.config/waybar/config-desktop @@ -1,9 +1,23 @@ { "layer": "top", - "position": "top", - "modules-left": ["hyprland/workspaces"], - "modules-center": ["clock"], - "modules-right": ["idle_inhibitor", "cpu", "memory", "disk", "temperature", "pulseaudio", "network", "tray"], + "position": "bottom", + "modules-left": [ + "hyprland/workspaces", + "idle_inhibitor" + ], + "modules-center": [ + "clock" + ], + "modules-right": [ + "cpu", + "memory", + "disk#root", + "disk#home", + "temperature", + "pulseaudio", + "network", + "tray", + ], "hyprland/workspaces": { "format": "{icon}", "on-click": "activate", @@ -11,7 +25,17 @@ "on-scroll-down": "hyprctl dispatch workspace e+1", "all-outputs": true, "persistent-workspaces": { - "*": [1,2,3,4,5,6,7,8,9] + "*": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ] } }, "clock": { @@ -20,19 +44,27 @@ "format-alt": "{:%Y-%m-%d}" }, "cpu": { - "format": " {usage}%" + "format": " {usage}%", + "interval": 2 }, "memory": { - "format": " {used}G/{total}G" + "format": " {used}G/{total}G", + "interval": 2 }, "temperature": { "critical-threshold": 80, "format": " {temperatureC}°C" }, - "disk": { - "format": " {free} free", + "disk#root": { + "interval": 60, + "format": " Root {percentage_used:2}%", "path": "/" }, + "disk#home": { + "interval": 60, + "format": " Home {percentage_used:2}%", + "path": "/home" + }, "idle_inhibitor": { "format": " {status}", "format-alt": " {status}" @@ -48,6 +80,7 @@ }, "pulseaudio": { "format": "{icon} {volume}%", + "format-bluetooth": "{icon} {volume}%", "format-muted": "󰝟 Muted", "format-icons": { "headphone": "󰋋", @@ -56,8 +89,18 @@ "phone": "󰏲", "portable": "󰦧", "car": "󰄋", - "default": ["󰕿", "󰖀", "󰕾"] + "default": [ + "󰕿", + "󰖀", + "󰕾" + ] }, - "on-click": "pavucontrol" + "scroll-step": 5, + "on-click": "pavucontrol", + "on-click-right": "pactl set-default-sink alsa_output.usb-FiiO_DigiHug_USB_Audio-01.iec958-stereo", + "on-click-middle": "pactl set-default-sink alsa_output.pci-0000_0c_00.1.hdmi-stereo" + }, + "tray": { + "icon-size": 20 } -} +} \ No newline at end of file diff --git a/.config/waybar/config-laptop b/.config/waybar/config-laptop index 855a66d..dfe6386 100644 --- a/.config/waybar/config-laptop +++ b/.config/waybar/config-laptop @@ -1,9 +1,25 @@ { "layer": "top", - "position": "top", - "modules-left": ["hyprland/workspaces"], - "modules-center": ["clock"], - "modules-right": ["idle_inhibitor", "backlight", "cpu", "memory", "disk", "temperature", "pulseaudio", "network", "battery", "tray"], + "position": "bottom", + "modules-left": [ + "hyprland/workspaces", + "idle_inhibitor" + ], + "modules-center": [ + "clock" + ], + "modules-right": [ + "backlight", + "cpu", + "memory", + "disk#root", + "disk#home", + "temperature", + "pulseaudio", + "network", + "battery", + "tray" + ], "hyprland/workspaces": { "format": "{icon}", "on-click": "activate", @@ -11,7 +27,17 @@ "on-scroll-down": "hyprctl dispatch workspace e+1", "all-outputs": true, "persistent-workspaces": { - "*": [1,2,3,4,5,6,7,8,9] + "*": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ] } }, "clock": { @@ -20,10 +46,12 @@ "format-alt": "{:%Y-%m-%d}" }, "cpu": { - "format": " {usage}%" + "format": " {usage}%", + "interval": 2 }, "memory": { - "format": " {used}G/{total}G" + "format": " {used}G/{total}G", + "interval": 2 }, "temperature": { "critical-threshold": 80, @@ -33,10 +61,16 @@ "device": "intel_backlight", "format": " {percent}%" }, - "disk": { - "format": " {free} free", + "disk#root": { + "interval": 60, + "format": " Root {percentage_used:2}%", "path": "/" }, + "disk#home": { + "interval": 60, + "format": " Home {percentage_used:2}%", + "path": "/home" + }, "idle_inhibitor": { "format": " {status}", "format-alt": " {status}" @@ -54,6 +88,7 @@ }, "pulseaudio": { "format": "{icon} {volume}%", + "format-bluetooth": "{icon} {volume}%", "format-muted": "󰝟 Muted", "format-icons": { "headphone": "󰋋", @@ -62,9 +97,16 @@ "phone": "󰏲", "portable": "󰦧", "car": "󰄋", - "default": ["󰕿", "󰖀", "󰕾"] + "default": [ + "󰕿", + "󰖀", + "󰕾" + ] }, - "on-click": "pavucontrol" + "scroll-step": 5, + "on-click": "pavucontrol", + "on-click-right": "pactl set-default-sink alsa_output.usb-FiiO_DigiHug_USB_Audio-01.iec958-stereo", + "on-click-middle": "pactl set-default-sink alsa_output.pci-0000_0c_00.1.hdmi-stereo" }, "battery": { "states": { @@ -77,6 +119,21 @@ "format-alt": "{icon} {capacity}% • {power:.1f}W • {time}", "format-time": "{H}h {M}m", "tooltip-format": "{capacity}% • {power:.1f}W\n{timeTo}", - "format-icons": ["󰂎", "󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"] + "format-icons": [ + "󰂎", + "󰁺", + "󰁻", + "󰁼", + "󰁽", + "󰁾", + "󰁿", + "󰂀", + "󰂁", + "󰂂", + "󰁹" + ] + }, + "tray": { + "icon-size": 20 } -} +} \ No newline at end of file