updated icons in waybar
This commit is contained in:
@@ -70,7 +70,7 @@
|
|||||||
"interval": 30,
|
"interval": 30,
|
||||||
"format-icons": {
|
"format-icons": {
|
||||||
// match these to the sink NAMES you see in `pactl list sinks`
|
// 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
|
"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
|
"bluez_output.50_5E_5C_2D_F3_B2.1": "", // Bluetooth earbud icon
|
||||||
"default": [
|
"default": [
|
||||||
@@ -96,14 +96,14 @@
|
|||||||
"exec": "$HOME/.config/waybar/scripts/alhp.sh",
|
"exec": "$HOME/.config/waybar/scripts/alhp.sh",
|
||||||
"return-type": "json",
|
"return-type": "json",
|
||||||
"interval": 60,
|
"interval": 60,
|
||||||
"format": "<span color=\"#4F84CC\">{text}</span>",
|
"format": "{text}",
|
||||||
"tooltip": true,
|
"tooltip": true,
|
||||||
},
|
},
|
||||||
"custom/razer-mouse-battery": {
|
"custom/razer-mouse-battery": {
|
||||||
"exec": "$HOME/.config/waybar/scripts/razer_basilisk_v3_pro_battery_info.sh",
|
"exec": "$HOME/.config/waybar/scripts/razer_basilisk_v3_pro_battery_info.sh",
|
||||||
"return-type": "json",
|
"return-type": "json",
|
||||||
"interval": 10,
|
"interval": 10,
|
||||||
"format": "<span color=\"#4F84CC\">{text}</span>",
|
"format": "{text}",
|
||||||
"tooltip": true,
|
"tooltip": true,
|
||||||
},
|
},
|
||||||
"tray": {
|
"tray": {
|
||||||
|
@@ -37,15 +37,15 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
case "$class" in
|
case "$class" in
|
||||||
good) icon="";;
|
good) icon=" ";;
|
||||||
stale) icon="";;
|
stale) icon=" ";;
|
||||||
bad) icon="";;
|
bad) icon=" ";;
|
||||||
down) icon="x";;
|
down) icon="x ";;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Emit compact JSON for Statusbar
|
# Emit compact JSON for Statusbar
|
||||||
jq -nc \
|
jq -nc \
|
||||||
--arg text "$icon $text" \
|
--arg text "<span color=\"#4F84CC\">$icon</span> <span color=\"#CAD3E8\">$text</span>" \
|
||||||
--arg class "$class" \
|
--arg class "$class" \
|
||||||
--arg tooltip "$tooltip" \
|
--arg tooltip "$tooltip" \
|
||||||
'{text: $text, class: $class, tooltip: $tooltip}'
|
'{text: $text, class: $class, tooltip: $tooltip}'
|
||||||
|
@@ -19,17 +19,21 @@ type=$(cat "$BASE_MOUSE/device_type")
|
|||||||
percent=$(( raw * 100 / 255 ))
|
percent=$(( raw * 100 / 255 ))
|
||||||
|
|
||||||
tooltip="$type"
|
tooltip="$type"
|
||||||
|
icon=""
|
||||||
|
|
||||||
# Choose icon + class
|
# Choose icon + class
|
||||||
if [[ $status -eq 1 ]]; then
|
if [[ $status -eq 1 ]]; then
|
||||||
icon="⚡"
|
icon="⚡"
|
||||||
cls="charging"
|
class="charging"
|
||||||
text=" $icon $percent%"
|
text="$percent%"
|
||||||
else
|
else
|
||||||
cls="not_charging"
|
class="not_charging"
|
||||||
text=" $percent%"
|
text="$percent%"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Output Waybar‐friendly JSON
|
jq -nc \
|
||||||
printf '{"text":"%s","class":"%s","tooltip":"%s"}\n' "$text" "$cls" "$tooltip"
|
--arg text "<span color=\"#4F84CC\">$icon</span> <span color=\"#CAD3E8\">$text</span>" \
|
||||||
|
--arg class "$class" \
|
||||||
|
--arg tooltip "$tooltip" \
|
||||||
|
'{text: $text, class: $class, tooltip: $tooltip}'
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user