Skip to content

Commit

Permalink
Merge pull request matryer#1514 from Scartiloffista/patch-1
Browse files Browse the repository at this point in the history
Update ejector.5s.sh
  • Loading branch information
matryer authored Dec 11, 2020
2 parents 16f4393 + 08eace1 commit 7a04cb0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions System/ejector.5s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# <bitbar.image>https://raw.githubusercontent.com/carlsonorozco/ejector/master/image.png</bitbar.image>
# <bitbar.abouturl>https://github.com/carlsonorozco/ejector</bitbar.abouturl>

drives=( $(df -Hl | grep /Volumes/ | sed 's/.*\/Volumes\/*//') )
drives=( $(df -Hl | grep /Volumes/ | grep -v "/System/Volumes/Data" | grep -v "/Volumes/Recovery" | sed 's/.*\/Volumes\/*//') )

IFS=$'**********'
for details in $( diskutil info -all ); do
Expand Down Expand Up @@ -86,7 +86,7 @@ if [ ${#drives[@]} = 0 ]; then
exit
fi

echo " | color=black"
echo ""
echo '---'

IFS=$'**********'
Expand All @@ -104,12 +104,12 @@ for details in $( diskutil info -all ); do
[[ $protocol = 'USB' ]] && ((total_usb++))

if [ "$mount_point" != '' ]; then
echo "$name | color=black bash='$0' param1=eject param2='$mount_point' terminal=false"
echo "$name [unmount] | alternate=true color=black bash='$0' param1=unmount param2='$mount_point' terminal=false"
echo "$name | bash='$0' param1=eject param2='$mount_point' terminal=false"
echo "$name [unmount] | alternate=true bash='$0' param1=unmount param2='$mount_point' terminal=false"
echo "├─ Available: $free_space"
echo "└─ Capacity: $total_size"
else
echo "$name | color=black bash='$0' param1=mount param2=$device_node terminal=false"
echo "$name | bash='$0' param1=mount param2=$device_node terminal=false"
echo "└─ Unmounted: $device_node"
fi
done
Expand All @@ -119,4 +119,4 @@ if [ ${#drives[@]} -ge 2 ]; then
[ $((total_dmg)) -ge 2 ] && echo "Eject All Disk Images | color=red bash='$0' param1=ejectall param2=dmgs terminal=false"
[ $((total_usb)) -ge 2 ] && echo "Eject All Physical Volumes | color=red bash='$0' param1=ejectall param2=usbs terminal=false"
echo "Eject All | color=red bash='$0' param1=ejectall terminal=false"
fi
fi

0 comments on commit 7a04cb0

Please sign in to comment.