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 '{
|
||||
"Discharging": {
|
||||
"0": "",
|
||||
"10": "",
|
||||
"20": "",
|
||||
"30": "",
|
||||
"40": "",
|
||||
"50": "",
|
||||
"60": "",
|
||||
"70": "",
|
||||
"80": "",
|
||||
"90": "",
|
||||
"100": ""
|
||||
},
|
||||
"Charging": {
|
||||
"0": "",
|
||||
"10": "",
|
||||
"20": "",
|
||||
"30": "",
|
||||
"40": "",
|
||||
"50": "",
|
||||
"60": "",
|
||||
"70": "",
|
||||
"80": "",
|
||||
"90": "",
|
||||
"100": ""
|
||||
}
|
||||
"Discharging": [
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
],
|
||||
"Charging": [
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
],
|
||||
"Full": [
|
||||
""
|
||||
]
|
||||
}')
|
||||
|
||||
(defwidget workspaces []
|
||||
|
@ -108,26 +111,26 @@
|
|||
(defwidget battery []
|
||||
(label
|
||||
: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
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status]["90"]}"
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status][1]}"
|
||||
: EWW_BATTERY.BAT0.capacity >= 80
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status]["80"]}"
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status][2]}"
|
||||
: EWW_BATTERY.BAT0.capacity >= 70
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status]["70"]}"
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status][3]}"
|
||||
: EWW_BATTERY.BAT0.capacity >= 60
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status]["60"]}"
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status][4]}"
|
||||
: EWW_BATTERY.BAT0.capacity >= 50
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status]["50"]}"
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status][5]}"
|
||||
: EWW_BATTERY.BAT0.capacity >= 40
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status]["40"]}"
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status][6]}"
|
||||
: EWW_BATTERY.BAT0.capacity >= 30
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status]["30"]}"
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status][7]}"
|
||||
: EWW_BATTERY.BAT0.capacity >= 20
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status]["20"]}"
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status][8]}"
|
||||
: EWW_BATTERY.BAT0.capacity >= 10
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status]["10"]}"
|
||||
: "${battery-icon[EWW_BATTERY.BAT0.status]["0"]}"} ${EWW_BATTERY.BAT0.capacity}%"
|
||||
? "${battery-icon[EWW_BATTERY.BAT0.status][9]}"
|
||||
: "${battery-icon[EWW_BATTERY.BAT0.status][10]}"} ${EWW_BATTERY.BAT0.capacity}%"
|
||||
)
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue