check if mac is laptop

This commit is contained in:
Stephen Parkinson
2022-02-28 15:14:27 -08:00
parent d2510183b0
commit 28cbbe6ba8
2 changed files with 5 additions and 2 deletions

5
zshrc
View File

@@ -56,5 +56,8 @@ if [ "$OSTYPE" = "Linux" ]; then
echo ""
elif [ "$OSTYPE" = "Darwin" ]; then
ssh-add -K ~/.ssh/id_rsa 2>/dev/null
batt
LAPTOP=$(system_profiler SPHardwareDataType | grep "Model Name" | grep "Book")
if [ "$LAPTOP" != "" ]; then
batt
fi
fi