@@ -269,7 +269,7 @@ case $1 in
269
269
--help) displayHelp; exit 0;;
270
270
--version) displayVersion; exit 0;;
271
271
esac
272
-
272
+
273
273
274
274
while getopts " :hsu:evVEnLNtlS:A:D:o:Bc:d:pa:" flags; do
275
275
case $flags in
@@ -524,7 +524,7 @@ detectdistro () {
524
524
fake_distro=" ${distro} "
525
525
;;
526
526
" GNU/Linux" )
527
- if type -p crux > /dev/null 2>&1 ; then
527
+ if type -p crux > /dev/null 2>&1 ; then
528
528
distro=" CRUX"
529
529
distro_more=" ${distro} $( crux | awk ' {print $3}' ) "
530
530
fi
@@ -851,9 +851,9 @@ detectpkgs () {
851
851
' CRUX' ) pkgs=$( pkginfo -i | wc -l) ;;
852
852
' Lunar Linux' ) pkgs=$( lvu installed | wc -l) ;;
853
853
' Mac OS X' )
854
- if [ -d " /usr/local/bin" ]; then
854
+ if [ -d " /usr/local/bin" ]; then
855
855
loc_pkgs=$( ls -l /usr/local/bin/ | grep -v " \(../Cellar/\|brew\)" | wc -l)
856
- pkgs=$(( ${loc_pkgs} - 1 )) ;
856
+ pkgs=$(( ${loc_pkgs} - 1 )) ;
857
857
fi
858
858
859
859
if type -p port > /dev/null 2>&1 ; then
@@ -866,15 +866,15 @@ detectpkgs () {
866
866
pkgs=$(( ${pkgs} + ${brew_pkgs} ))
867
867
fi
868
868
;;
869
- ' OpenBSD' )
869
+ ' OpenBSD' )
870
870
pkgs=$( pkg_info | wc -l | awk ' {sub(" ", "");print $1}' )
871
871
if type -p portmaster > /dev/null 2>&1 ; then
872
872
ports=$( portmaster -l | grep -Eo ' [0-9]+ total installed' | sed ' s/ total installed//' )
873
873
pkgs=$(( ${pkgs} + ${ports} ))
874
874
fi
875
875
;;
876
876
' FreeBSD' )
877
- pkgs=$( if TMPDIR=/dev/null ASSUME_ALWAYS_YES=1 PACKAGESITE=file:///nonexistent pkg info pkg > /dev/null 2>&1 ; then
877
+ pkgs=$( if TMPDIR=/dev/null ASSUME_ALWAYS_YES=1 PACKAGESITE=file:///nonexistent pkg info pkg > /dev/null 2>&1 ; then
878
878
pkg info | wc -l | awk ' {print $1}' ; else pkg_info | wc -l | awk ' {sub(" ", "");print $1}' ; fi)
879
879
;;
880
880
' Cygwin' )
@@ -933,7 +933,7 @@ detectcpu () {
933
933
if [ -z " $cpu " ]; then
934
934
cpu=$( awk ' BEGIN{FS=":"} /Hardware/ { print $2; exit }' /proc/cpuinfo)
935
935
fi
936
- if [ -z " $cpu " ]; then
936
+ if [ -z " $cpu " ]; then
937
937
cpu=$( awk ' BEGIN{FS=":"} /^cpu/ { gsub(/ +/," ",$2); print $2; exit}' /proc/cpuinfo | sed ' s/, altivec supported//;s/^ //' )
938
938
if [[ $cpu =~ ^(PPC)* 9.+ ]]; then
939
939
model=" IBM PowerPC G5 "
@@ -1043,7 +1043,7 @@ detectdisk () {
1043
1043
diskusage_verbose=$( sed ' s/%/%%/' <<< $diskusage )
1044
1044
fi
1045
1045
verboseOut " Finding current disk usage...found as '$diskusage_verbose '"
1046
- }
1046
+ }
1047
1047
# Disk Usage Detection - End
1048
1048
1049
1049
@@ -1057,7 +1057,7 @@ detectmem () {
1057
1057
wiredmem=$( vm_stat | grep wired | awk ' { print $4 }' | sed ' s/\.//' )
1058
1058
activemem=$( vm_stat | grep ' active' | awk ' { print $3 }' | sed ' s/\.//' )
1059
1059
compressedmem=$( vm_stat | grep occupied | awk ' { print $5 }' | sed ' s/\.//' )
1060
- usedmem=$(( (${wiredmem} + ${activemem} + ${compressedmem} ) * 4 / $human ))
1060
+ usedmem=$(( (${wiredmem} + ${activemem} + ${compressedmem} ) * 4 / $human ))
1061
1061
elif [ " $distro " == " Cygwin" ]; then
1062
1062
total_mem=$( awk ' /MemTotal/ { print $2 }' /proc/meminfo)
1063
1063
totalmem=$(( ${total_mem} / $human ))
@@ -1233,7 +1233,7 @@ detectres () {
1233
1233
1234
1234
xResolution=" "
1235
1235
len=${# width[@]}
1236
-
1236
+
1237
1237
delim=" "
1238
1238
for (( i= 0 ;i< len;i++ )) ; do
1239
1239
xResolution=" ${xResolution}${delim}${width[i]} x${height[i]} "
@@ -1661,7 +1661,7 @@ detectwmtheme () {
1661
1661
' dminiwm' ) Win_theme=" Not Applicable" ;;
1662
1662
' dwm' ) Win_theme=" Not Applicable" ;;
1663
1663
' E16' ) Win_theme=" $( awk -F" = " ' /theme.name/ {print $2}' $HOME /.e16/e_config--0.0.cfg) " ;;
1664
- ' E17' |' Enlightenment' )
1664
+ ' E17' |' Enlightenment' )
1665
1665
if [ " $( which eet 2> /dev/null) " ]; then
1666
1666
econfig=" $( eet -d $HOME /.e/e/config/standard/e.cfg config | awk ' /value \"file\" string.*.edj/{ print $4 }' ) "
1667
1667
econfigend=" ${econfig##*/ } "
@@ -2042,7 +2042,7 @@ takeShot () {
2042
2042
if [[ -z $screenCommand ]]; then
2043
2043
if [[ " ${upload} " == " 1" ]]; then
2044
2044
shotfiles[1]=${shotfile}
2045
- if [ " $distro " == " Mac OS X" ]; then
2045
+ if [ " $distro " == " Mac OS X" ]; then
2046
2046
displays=" $( system_profiler SPDisplaysDataType | grep ' Resolution:' | wc -l | tr -d ' ' ) "
2047
2047
for (( i= 2 ; i<= $displays ; i++ ))
2048
2048
do
@@ -2101,14 +2101,14 @@ takeShot () {
2101
2101
scp -qo ConnectTimeout=" ${scptimeout} " " ${shotfiles[@]} " " ${serveraddr} :${serverdir} "
2102
2102
desturl=" ${baseurl} /${shotfile} "
2103
2103
;;
2104
- esac
2104
+ esac
2105
2105
printf " your screenshot can be viewed at ${desturl} \n"
2106
2106
else
2107
2107
errorOut " ERROR: Problem saving screenshot to ${shotfiles[@]} "
2108
2108
fi
2109
2109
else
2110
2110
shotfiles[1]=${shotfile}
2111
- if [ " $distro " == " Mac OS X" ]; then
2111
+ if [ " $distro " == " Mac OS X" ]; then
2112
2112
displays=" $( system_profiler SPDisplaysDataType | grep ' Resolution:' | wc -l | tr -d ' ' ) "
2113
2113
for (( i= 2 ; i<= $displays ; i++ ))
2114
2114
do
@@ -3482,7 +3482,7 @@ asciiText () {
3482
3482
" ${c1} .'"
3483
3483
" ${c1} ." )
3484
3484
;;
3485
-
3485
+
3486
3486
" Kali Linux" )
3487
3487
if [[ " $no_color " != " 1" ]]; then
3488
3488
c1=$( getColor ' light blue' ) # White
@@ -3543,9 +3543,9 @@ asciiText () {
3543
3543
3544
3544
" KaOS" )
3545
3545
if [[ " $no_color " != " 1" ]]; then
3546
- c1=$( getColor ' light blue' )
3547
- c2=$( getColor ' light grey' )
3548
- c3=$( getColor ' red' )
3546
+ c1=$( getColor ' light blue' )
3547
+ c2=$( getColor ' light grey' )
3548
+ c3=$( getColor ' red' )
3549
3549
fi
3550
3550
if [ -n " ${my_lcolor} " ]; then c1=" ${my_lcolor} " ; c2=" ${my_lcolor} " ; fi
3551
3551
startline=" 0"
@@ -3976,24 +3976,24 @@ infoDisplay () {
3976
3976
if [[ " ${display[@]} " =~ " gtk" ]]; then
3977
3977
if [ " $distro " == " Mac OS X" ]; then
3978
3978
if [[ " $gtkFont " != " Not Applicable" && " $gtkFont " != " Not Found" ]]; then
3979
- if [ -n " $gtkFont " ]; then
3979
+ if [ -n " $gtkFont " ]; then
3980
3980
myfont=$( echo -e " $labelcolor Font:$textcolor $gtkFont " ) ; out_array=( " ${out_array[@]} " " $myfont " ); (( display_index++ ))
3981
3981
fi
3982
3982
fi
3983
3983
else
3984
3984
if [[ " $gtk2Theme " != " Not Applicable" && " $gtk2Theme " != " Not Found" ]]; then
3985
- if [ -n " $gtk2Theme " ]; then
3985
+ if [ -n " $gtk2Theme " ]; then
3986
3986
mygtk2=" ${gtk2Theme} [GTK2]"
3987
3987
fi
3988
3988
fi
3989
3989
if [[ " $gtk3Theme " != " Not Applicable" && " $gtk3Theme " != " Not Found" ]]; then
3990
- if [ -n " $mygtk2 " ]; then
3990
+ if [ -n " $mygtk2 " ]; then
3991
3991
mygtk3=" , ${gtk3Theme} [GTK3]"
3992
3992
else
3993
3993
mygtk3=" ${gtk3Theme} [GTK3]"
3994
3994
fi
3995
3995
fi
3996
- if [[ " $gtk_2line " == " yes" ]]; then
3996
+ if [[ " $gtk_2line " == " yes" ]]; then
3997
3997
mygtk2=$( echo -e " $labelcolor GTK2 Theme:$textcolor $gtk2Theme " ) ; out_array=( " ${out_array[@]} " " $mygtk2 " ); (( display_index++ ))
3998
3998
mygtk3=$( echo -e " $labelcolor GTK3 Theme:$textcolor $gtk3Theme " ) ; out_array=( " ${out_array[@]} " " $mygtk3 " ); (( display_index++ ))
3999
3999
else
@@ -4006,12 +4006,12 @@ infoDisplay () {
4006
4006
fi
4007
4007
fi
4008
4008
if [[ " $gtkIcons " != " Not Applicable" && " $gtkIcons " != " Not Found" ]]; then
4009
- if [ -n " $gtkIcons " ]; then
4009
+ if [ -n " $gtkIcons " ]; then
4010
4010
myicons=$( echo -e " $labelcolor Icon Theme:$textcolor $gtkIcons " ) ; out_array=( " ${out_array[@]} " " $myicons " ); (( display_index++ ))
4011
4011
fi
4012
4012
fi
4013
4013
if [[ " $gtkFont " != " Not Applicable" && " $gtkFont " != " Not Found" ]]; then
4014
- if [ -n " $gtkFont " ]; then
4014
+ if [ -n " $gtkFont " ]; then
4015
4015
myfont=$( echo -e " $labelcolor Font:$textcolor $gtkFont " ) ; out_array=( " ${out_array[@]} " " $myfont " ); (( display_index++ ))
4016
4016
fi
4017
4017
fi
@@ -4150,9 +4150,9 @@ for i in "${display[@]}"; do
4150
4150
! [[ $WM ]] && detectwm;
4151
4151
! [[ $Win_theme ]] && detectwmtheme;
4152
4152
else
4153
- if [[ " ${display[*]} " =~ " $i " ]]; then
4153
+ if [[ " ${display[*]} " =~ " $i " ]]; then
4154
4154
if [[ " $errorSuppress " == " 1" ]]; then detect${i} 2> /dev/null
4155
- else
4155
+ else
4156
4156
exec 3> >( stderrOut)
4157
4157
detect${i} 2>&3
4158
4158
exec 3>& -
0 commit comments