Skip to content

Commit 3b20bf7

Browse files
committed
Add WSL Desktop Assumtion Conditional Before Assessing Status
1 parent ded3c40 commit 3b20bf7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/battery_icon_status.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ get_icon_status_settings() {
3939

4040
print_icon_status() {
4141
local status=$1
42-
if [[ $status =~ (charged) || $status =~ (full) ]]; then
42+
if [[ is_wsl && -z $status ]]; then
43+
# WSL env with no battery -> _probably_ gonna be a desktop!
44+
printf "$icon_status_charged"
45+
elif [[ $status =~ (charged) || $status =~ (full) ]]; then
4346
printf "$icon_status_charged"
4447
elif [[ $status =~ (^charging) ]]; then
4548
printf "$icon_status_charging"

0 commit comments

Comments
 (0)