Added charging Icon to default battery layout

This commit is contained in:
Honney
2026-06-08 12:31:30 +02:00
parent 79abfceb01
commit 4321224d1d
2 changed files with 24 additions and 2 deletions
+3
View File
@@ -118,6 +118,9 @@ declare -A MAP=(
["viewnior"]=""
# Image Editor
["gimp"]="󱇣"
["org.inkscape.Inkscape"]="󱇣"
# CNC
["LightBurn"]="󱇣"
)
# APPS=$(hyprctl clients -j | jq -r ".[] | select(.workspace.id == $ID) | .initialTitle")
+21 -2
View File
@@ -42,7 +42,26 @@ MouseArea {
font.family: "Nerd Font"
color: (
BatteryState.charging ? BatteryState.percentage == 100 ? "white" : "green" :
BatteryState.percentage < 5 ? "red" :
BatteryState.percentage <= 5 ? "red" :
BatteryState.percentage < 10 ? "yellow" :
batteryButton.containsMouse ? Colors.tertiary_fg :
Colors.primary
)
}
Text {
id: batteryChargingText
visible : !clicked && BatteryState.charging
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
text: "󱐋"
style: Text.Outline
styleColor: Colors.tertiaryContainer
font.pixelSize: 26
font.family: "Nerd Font"
color: (
BatteryState.charging ? BatteryState.percentage == 100 ? "white" : "green" :
BatteryState.percentage <= 5 ? "red" :
BatteryState.percentage < 10 ? "yellow" :
batteryButton.containsMouse ? Colors.tertiary_fg :
Colors.primary
@@ -70,7 +89,7 @@ MouseArea {
font.pixelSize: BatteryState.charging ? "󰂄" : batteryText.font.pixelSize*0.75
font.family: "Nerd Font"
color: (
BatteryState.percentage < 5 ? "red" :
BatteryState.percentage <= 5 ? "red" :
BatteryState.charging ? "green" :
BatteryState.percentage < 10 ? "yellow" :
batteryButton.containsMouse ? Colors.tertiary_fg :