fix(eww): battery
This commit is contained in:
parent
0eb1cdef9f
commit
aa25a36e0d
1 changed files with 40 additions and 37 deletions
|
@ -25,32 +25,35 @@
|
||||||
}')
|
}')
|
||||||
|
|
||||||
(defvar battery-icon '{
|
(defvar battery-icon '{
|
||||||
"Discharging": {
|
"Discharging": [
|
||||||
"0": "",
|
"",
|
||||||
"10": "",
|
"",
|
||||||
"20": "",
|
"",
|
||||||
"30": "",
|
"",
|
||||||
"40": "",
|
"",
|
||||||
"50": "",
|
"",
|
||||||
"60": "",
|
"",
|
||||||
"70": "",
|
"",
|
||||||
"80": "",
|
"",
|
||||||
"90": "",
|
"",
|
||||||
"100": ""
|
""
|
||||||
},
|
],
|
||||||
"Charging": {
|
"Charging": [
|
||||||
"0": "",
|
"",
|
||||||
"10": "",
|
"",
|
||||||
"20": "",
|
"",
|
||||||
"30": "",
|
"",
|
||||||
"40": "",
|
"",
|
||||||
"50": "",
|
"",
|
||||||
"60": "",
|
"",
|
||||||
"70": "",
|
"",
|
||||||
"80": "",
|
"",
|
||||||
"90": "",
|
"",
|
||||||
"100": ""
|
""
|
||||||
}
|
],
|
||||||
|
"Full": [
|
||||||
|
""
|
||||||
|
]
|
||||||
}')
|
}')
|
||||||
|
|
||||||
(defwidget workspaces []
|
(defwidget workspaces []
|
||||||
|
@ -108,26 +111,26 @@
|
||||||
(defwidget battery []
|
(defwidget battery []
|
||||||
(label
|
(label
|
||||||
:text "${EWW_BATTERY.BAT0.capacity == 100
|
:text "${EWW_BATTERY.BAT0.capacity == 100
|
||||||
? "${battery-icon[EWW_BATTERY.BAT0.status]["100"]}"
|
? "${battery-icon[EWW_BATTERY.BAT0.status][0]}"
|
||||||
: EWW_BATTERY.BAT0.capacity >= 90
|
: EWW_BATTERY.BAT0.capacity >= 90
|
||||||
? "${battery-icon[EWW_BATTERY.BAT0.status]["90"]}"
|
? "${battery-icon[EWW_BATTERY.BAT0.status][1]}"
|
||||||
: EWW_BATTERY.BAT0.capacity >= 80
|
: EWW_BATTERY.BAT0.capacity >= 80
|
||||||
? "${battery-icon[EWW_BATTERY.BAT0.status]["80"]}"
|
? "${battery-icon[EWW_BATTERY.BAT0.status][2]}"
|
||||||
: EWW_BATTERY.BAT0.capacity >= 70
|
: EWW_BATTERY.BAT0.capacity >= 70
|
||||||
? "${battery-icon[EWW_BATTERY.BAT0.status]["70"]}"
|
? "${battery-icon[EWW_BATTERY.BAT0.status][3]}"
|
||||||
: EWW_BATTERY.BAT0.capacity >= 60
|
: EWW_BATTERY.BAT0.capacity >= 60
|
||||||
? "${battery-icon[EWW_BATTERY.BAT0.status]["60"]}"
|
? "${battery-icon[EWW_BATTERY.BAT0.status][4]}"
|
||||||
: EWW_BATTERY.BAT0.capacity >= 50
|
: EWW_BATTERY.BAT0.capacity >= 50
|
||||||
? "${battery-icon[EWW_BATTERY.BAT0.status]["50"]}"
|
? "${battery-icon[EWW_BATTERY.BAT0.status][5]}"
|
||||||
: EWW_BATTERY.BAT0.capacity >= 40
|
: EWW_BATTERY.BAT0.capacity >= 40
|
||||||
? "${battery-icon[EWW_BATTERY.BAT0.status]["40"]}"
|
? "${battery-icon[EWW_BATTERY.BAT0.status][6]}"
|
||||||
: EWW_BATTERY.BAT0.capacity >= 30
|
: EWW_BATTERY.BAT0.capacity >= 30
|
||||||
? "${battery-icon[EWW_BATTERY.BAT0.status]["30"]}"
|
? "${battery-icon[EWW_BATTERY.BAT0.status][7]}"
|
||||||
: EWW_BATTERY.BAT0.capacity >= 20
|
: EWW_BATTERY.BAT0.capacity >= 20
|
||||||
? "${battery-icon[EWW_BATTERY.BAT0.status]["20"]}"
|
? "${battery-icon[EWW_BATTERY.BAT0.status][8]}"
|
||||||
: EWW_BATTERY.BAT0.capacity >= 10
|
: EWW_BATTERY.BAT0.capacity >= 10
|
||||||
? "${battery-icon[EWW_BATTERY.BAT0.status]["10"]}"
|
? "${battery-icon[EWW_BATTERY.BAT0.status][9]}"
|
||||||
: "${battery-icon[EWW_BATTERY.BAT0.status]["0"]}"} ${EWW_BATTERY.BAT0.capacity}%"
|
: "${battery-icon[EWW_BATTERY.BAT0.status][10]}"} ${EWW_BATTERY.BAT0.capacity}%"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue