check if mac is laptop
This commit is contained in:
@@ -44,6 +44,6 @@ function lab() {
|
|||||||
tput setaf 7; tput bold; echo -en "Lab: "
|
tput setaf 7; tput bold; echo -en "Lab: "
|
||||||
tput sgr0
|
tput sgr0
|
||||||
tput setaf 7
|
tput setaf 7
|
||||||
echo -en $(curl -s https://cpsecurity.club/api/v1/status | jq ".data.status" | tr -d "\"")
|
echo $(curl -s https://cpsecurity.club/api/v1/status | jq ".data.status" | tr -d "\"")
|
||||||
tput sgr0
|
tput sgr0
|
||||||
}
|
}
|
||||||
|
|||||||
3
zshrc
3
zshrc
@@ -56,5 +56,8 @@ if [ "$OSTYPE" = "Linux" ]; then
|
|||||||
echo ""
|
echo ""
|
||||||
elif [ "$OSTYPE" = "Darwin" ]; then
|
elif [ "$OSTYPE" = "Darwin" ]; then
|
||||||
ssh-add -K ~/.ssh/id_rsa 2>/dev/null
|
ssh-add -K ~/.ssh/id_rsa 2>/dev/null
|
||||||
|
LAPTOP=$(system_profiler SPHardwareDataType | grep "Model Name" | grep "Book")
|
||||||
|
if [ "$LAPTOP" != "" ]; then
|
||||||
batt
|
batt
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user