updated icons in waybar

This commit is contained in:
2025-07-10 23:18:54 +02:00
parent 37fe2f72ad
commit ff37269ac4
3 changed files with 19 additions and 15 deletions

View File

@@ -70,7 +70,7 @@
"interval": 30,
"format-icons": {
// match these to the sink NAMES you see in `pactl list sinks`
"alsa_output.usb-SteelSeries_Arctis_7_-00.analog-stereo": "", // SteelSeries headset
"alsa_output.usb-SteelSeries_Arctis_7_-00.analog-stereo": "", // SteelSeries headset
"alsa_output.pci-0000_0a_00.4.iec958-stereo": "", // speaker icon for your soundbar
"bluez_output.50_5E_5C_2D_F3_B2.1": "", // Bluetooth earbud icon
"default": [
@@ -96,14 +96,14 @@
"exec": "$HOME/.config/waybar/scripts/alhp.sh",
"return-type": "json",
"interval": 60,
"format": "<span color=\"#4F84CC\">{text}</span>",
"format": "{text}",
"tooltip": true,
},
"custom/razer-mouse-battery": {
"exec": "$HOME/.config/waybar/scripts/razer_basilisk_v3_pro_battery_info.sh",
"return-type": "json",
"interval": 10,
"format": "<span color=\"#4F84CC\">{text}</span>",
"format": "{text}",
"tooltip": true,
},
"tray": {

View File

@@ -45,7 +45,7 @@ esac
# Emit compact JSON for Statusbar
jq -nc \
--arg text "$icon $text" \
--arg text "<span color=\"#4F84CC\">$icon</span> <span color=\"#CAD3E8\">$text</span>" \
--arg class "$class" \
--arg tooltip "$tooltip" \
'{text: $text, class: $class, tooltip: $tooltip}'

View File

@@ -19,17 +19,21 @@ type=$(cat "$BASE_MOUSE/device_type")
percent=$(( raw * 100 / 255 ))
tooltip="$type"
icon="󰍽"
# Choose icon + class
if [[ $status -eq 1 ]]; then
icon="⚡"
cls="charging"
text="󰍽 $icon $percent%"
icon="󰍽⚡"
class="charging"
text="$percent%"
else
cls="not_charging"
text="󰍽 $percent%"
class="not_charging"
text="$percent%"
fi
# Output Waybarfriendly JSON
printf '{"text":"%s","class":"%s","tooltip":"%s"}\n' "$text" "$cls" "$tooltip"
jq -nc \
--arg text "<span color=\"#4F84CC\">$icon</span> <span color=\"#CAD3E8\">$text</span>" \
--arg class "$class" \
--arg tooltip "$tooltip" \
'{text: $text, class: $class, tooltip: $tooltip}'