Skip to content

Commit 1d72ee1

Browse files
committed
shfmt
1 parent f9f8ae3 commit 1d72ee1

File tree

1 file changed

+21
-23
lines changed

1 file changed

+21
-23
lines changed

battstat

+21-23
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env sh
22

3-
charging_icon="" # U+26A1 - Thunderbolt
3+
charging_icon="" # U+26A1 - Thunderbolt
44
discharging_icon="🔋" # U+1F50B - Battery
55
format=false # Track whether formatting was supplied from the user
66

@@ -170,7 +170,6 @@ case $(uname) in
170170
;;
171171
esac
172172

173-
174173
while test $# -gt 0; do
175174
case "$1" in
176175
--percent-when-charged)
@@ -188,33 +187,32 @@ while test $# -gt 0; do
188187
shift
189188
;;
190189
{i})
191-
format=true
192-
print_icon
193-
shift
194-
;;
190+
format=true
191+
print_icon
192+
shift
193+
;;
195194
{t})
196-
format=true
197-
print_time
198-
shift
199-
;;
195+
format=true
196+
print_time
197+
shift
198+
;;
200199
{p})
201-
format=true
202-
print_percent
203-
shift
204-
;;
200+
format=true
201+
print_percent
202+
shift
203+
;;
205204
*)
206-
print_help
207-
break
208-
;;
205+
print_help
206+
break
207+
;;
209208
esac
210209
done
211210

212-
if [ "$format" = false ]
213-
then
214-
# No format was provided by the user, so print the default format
215-
print_time
216-
print_percent
217-
print_icon
211+
if [ "$format" = false ]; then
212+
# No format was provided by the user, so print the default format
213+
print_time
214+
print_percent
215+
print_icon
218216
fi
219217

220218
printf "\n"

0 commit comments

Comments
 (0)