Improve Waybar config: add tray and idle_inhibitor, clock calendar tooltip, weather on-click, portable power profile via powerprofilesctl, enhanced battery/temp tooltips, backlight scroll; update CSS for idle_inhibitor and fix bluetooth semicolon

This commit is contained in:
nicholai 2025-09-08 04:21:17 -06:00
parent fa1ef980b1
commit 8672155b0a
2 changed files with 44 additions and 30 deletions

View File

@ -8,9 +8,11 @@
"height": 20, "height": 20,
"modules-left": ["clock","custom/weather","custom/wallpaper","hyprland/window"], "modules-left": ["clock","custom/weather","custom/wallpaper","hyprland/window"],
"modules-center": ["hyprland/workspaces"], "modules-center": ["hyprland/workspaces"],
"modules-right": ["network", "bluetooth", "temperature","custom/power_profile","battery","backlight","pulseaudio","pulseaudio#microphone"], "modules-right": ["network", "bluetooth", "temperature","custom/power_profile","battery","backlight","pulseaudio","pulseaudio#microphone","tray","idle_inhibitor"],
"hyprland/window": { "hyprland/window": {
"format": "{}" "format": "{}",
"max-length": 60,
"tooltip": true
}, },
@ -40,13 +42,13 @@
}, },
"custom/power_profile":{ "custom/power_profile": {
//shows the current power profile and switches to next on click "exec": "powerprofilesctl get",
// "exec": "asusctl profile -p | sed s:'Active profile is'::", "interval": 5,
"interval": 30, "format": "󰈐 {}",
"format": "󰈐{}", "on-click": "pp=$(powerprofilesctl get); case \"$pp\" in performance) n=balanced;; balanced) n=powersave;; *) n=performance;; esac; powerprofilesctl set \"$n\"; pkill -SIGRTMIN+8 waybar",
// "on-click": "asusctl profile -n; pkill -SIGRTMIN+8 waybar", "signal": 8,
"signal": 8 "return-type": "string"
}, },
"custom/weather" : { "custom/weather" : {
@ -55,32 +57,40 @@
"format" : "{}", "format" : "{}",
"interval" : 30, "interval" : 30,
"exec" : "~/.config/waybar/scripts/waybar-wttr.py", "exec" : "~/.config/waybar/scripts/waybar-wttr.py",
"return-type" : "json" "return-type" : "json",
"on-click": "xdg-open https://wttr.in"
}, },
// "tray": { "tray": {
// "icon-size": 18, "icon-size": 18,
// "spacing": 10 "spacing": 10
// }, },
// "clock": { // "clock": {
// "format": "{: %I:%M %p  %a, %b %e}", // "format": "{: %I:%M %p  %a, %b %e}",
// "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>" // "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"
// }, // },
"clock": { "clock": {
"format": "{:%I:%M %p}" // hours:minutes AM/PM "format": "{:%I:%M %p}",
// or 24-hour: "{:%H:%M}" "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "󰒳",
"deactivated": "󰒲"
},
"tooltip": true
}, },
// "backlight": { "backlight": {
// "device": "intel_backlight", "format": "{icon} {percent}%",
// "format": "{icon} {percent}%", "format-icons": ["󰃞", "󰃟", "󰃠"],
// "format-icons": ["󰃞", "󰃟", "󰃠"], "on-scroll-up": "brightnessctl set 5%+",
// "on-scroll-up": "brightnessctl set 1%+", "on-scroll-down": "brightnessctl set 5%-",
// "on-scroll-down": "brightnessctl set 1%-", "min-length": 6
// "min-length": 6 },
// },
"battery": { "battery": {
"states": { "states": {
@ -92,7 +102,9 @@
"format-charging": " {capacity}%", "format-charging": " {capacity}%",
"format-plugged": " {capacity}%", "format-plugged": " {capacity}%",
"format-alt": "{time} {icon}", "format-alt": "{time} {icon}",
"format-icons": ["󰂎", "󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"] "format-icons": ["󰂎", "󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"],
"tooltip": true,
"tooltip-format": "{status} • {capacity}%\n{timeTo}\nHealth: {health}"
}, },
"pulseaudio": { "pulseaudio": {
@ -128,7 +140,8 @@
"thermal-zone": 1, "thermal-zone": 1,
"format": "{temperatureF}°F ", "format": "{temperatureF}°F ",
"critical-threshold": 80, "critical-threshold": 80,
"format-critical": "{temperatureC}°C " "format-critical": "{temperatureF}°F ",
"tooltip": true
}, },
"network": { "network": {
@ -149,4 +162,4 @@
"tooltip-format-enumerate-connected": "{device_alias}", "tooltip-format-enumerate-connected": "{device_alias}",
"on-click": "blueman-manager" // launch the GUI when you leftclick "on-click": "blueman-manager" // launch the GUI when you leftclick
} }
} }

View File

@ -58,7 +58,8 @@ window#waybar {
#temperature, #temperature,
#workspaces, #workspaces,
#tray, #tray,
#backlight { #backlight,
#idle_inhibitor {
background: @background; background: @background;
color: @color12; color: @color12;
opacity: 0.8; opacity: 0.8;
@ -141,7 +142,7 @@ window#waybar {
color: @color5; color: @color5;
background: @background; background: @background;
border-radius: 0px 5px 5px 0px; border-radius: 0px 5px 5px 0px;
margin-right: 10px margin-right: 10px;
} }
#pulseaudio { #pulseaudio {
@ -172,4 +173,4 @@ window#waybar {
border-radius: 0px 5px 5px 0px; border-radius: 0px 5px 5px 0px;
border-right: 0px; border-right: 0px;
margin-left: 0px; margin-left: 0px;
} }