File tree 1 file changed +21
-23
lines changed
1 file changed +21
-23
lines changed Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env sh
2
2
3
- charging_icon=" ⚡" # U+26A1 - Thunderbolt
3
+ charging_icon=" ⚡" # U+26A1 - Thunderbolt
4
4
discharging_icon=" 🔋" # U+1F50B - Battery
5
5
format=false # Track whether formatting was supplied from the user
6
6
@@ -170,7 +170,6 @@ case $(uname) in
170
170
;;
171
171
esac
172
172
173
-
174
173
while test $# -gt 0; do
175
174
case " $1 " in
176
175
--percent-when-charged)
@@ -188,33 +187,32 @@ while test $# -gt 0; do
188
187
shift
189
188
;;
190
189
{i})
191
- format=true
192
- print_icon
193
- shift
194
- ;;
190
+ format=true
191
+ print_icon
192
+ shift
193
+ ;;
195
194
{t})
196
- format=true
197
- print_time
198
- shift
199
- ;;
195
+ format=true
196
+ print_time
197
+ shift
198
+ ;;
200
199
{p})
201
- format=true
202
- print_percent
203
- shift
204
- ;;
200
+ format=true
201
+ print_percent
202
+ shift
203
+ ;;
205
204
* )
206
- print_help
207
- break
208
- ;;
205
+ print_help
206
+ break
207
+ ;;
209
208
esac
210
209
done
211
210
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
218
216
fi
219
217
220
218
printf " \n"
You can’t perform that action at this time.
0 commit comments