User
发布于 2023-07-16 / 12 阅读 / 0 评论 / 0 点赞

MAC OS

MAC OS

弹窗通知

#!/bin/bash
# 弹窗
# osascript -e 是执行一段apple script
# display alert是弹窗
# as critcal是用来控制图标,可以as三个值(informational,warning,critical,默认是informational)
#osascript -e 'display alert "通知!!" as critical'

# 发通知
# display notification 是发通知的命令后面紧跟着通知内容
# with title 可以修改通知标题(默认是“脚本编辑器”)
# subtitle 可以添加一个子标题(默认没有)
# sound name 可以用来选择一种通知的声音,声音存放在/System/Library/Sounds中
# osascript -e 'display notification "通知内容" with title "标题" subtitle "子标题" sound name "Glass"'
osascript -e 'display notification "时间到了,该出发了。" with title "恰饭恰饭" subtitle "" sound name "Glass"'

Terminal

export CLICOLOR=1
export LSCOLORS=gxfxaxdxcxegedabagacad
export PS1="\n[\e[1;32m\u\e[1;31m@\e[1;36m\h\e[0m \e[1;31m\t\e[0m] : \e[1;35m\w\e[0m\n$?> "

评论