File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /usr/bin/env sh
22
3- charging_icon=" ⚡" # U+26A1 - Thunderbolt
3+ charging_icon=" ⚡" # U+26A1 - Thunderbolt
44discharging_icon=" 🔋" # U+1F50B - Battery
55format=false # Track whether formatting was supplied from the user
66
@@ -170,7 +170,6 @@ case $(uname) in
170170 ;;
171171esac
172172
173-
174173while 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
210209done
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
218216fi
219217
220218printf " \n"
You can’t perform that action at this time.
0 commit comments