mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
most questionable commit on this pr
This commit is contained in:
@@ -85,6 +85,7 @@ Singleton {
|
||||
"battery-2": "battery-2",
|
||||
"battery-1": "battery-1",
|
||||
"battery": "battery",
|
||||
"battery-off": "battery-off",
|
||||
"wifi-0": "wifi-0",
|
||||
"wifi-1": "wifi-1",
|
||||
"wifi-2": "wifi-2",
|
||||
|
||||
@@ -226,19 +226,22 @@ Singleton {
|
||||
if (pluggedIn) {
|
||||
return "battery-charging-2";
|
||||
}
|
||||
if (percent >= 90) {
|
||||
if (percent >= 80) {
|
||||
return "battery-4";
|
||||
}
|
||||
if (percent >= 60) {
|
||||
return "battery-3";
|
||||
}
|
||||
if (percent >= 30) {
|
||||
if (percent >= 40) {
|
||||
return "battery-2";
|
||||
}
|
||||
if (percent >= 0) {
|
||||
if (percent >= 20) {
|
||||
return "battery-1";
|
||||
}
|
||||
return "battery";
|
||||
if (percent >= 0) {
|
||||
return "battery";
|
||||
}
|
||||
return "battery-off" // New fallback icon clearly represent if nothing is true here.
|
||||
}
|
||||
|
||||
function hasAnyBattery() {
|
||||
|
||||
Reference in New Issue
Block a user