macos 快速启动启动台_无法获取macOS通知? 这是解决方法(无需重新启动)

macos 快速启动启动台

macos 快速启动启动台

If your Mac is mysteriously no longer showing notifications, restarting your Mac will most likely fix the problem. However, here’s a quick way to remedy the situation without restarting.

如果Mac神秘地不再显示通知,则重新启动Mac很可能会解决此问题。 但是,这是无需重新启动即可解决这种情况的快速方法。

I recently updated my MacBook Pro to the latest version of macOS High Sierra, but after the update, I was no longer receiving any notifications. I could’ve rebooted my machine to fix it, but I already had a ton of tabs and other applications running and I didn’t want to shut all that down. Instead, I just used the built-in macOS utility Activity Monitor.

我最近将MacBook Pro更新为最新版本的macOS High Sierra,但更新后,我不再收到任何通知。 我可以重启机器来修复它,但是我已经运行了大量的选项卡和其他应用程序,并且我不想关闭所有功能。 相反,我只使用了内置的macOS实用程序Activity Monitor。

Activity Monitor lets you see everything that your Mac is running, even stuff that’s running in the background that you can’t see with your own eyes. You can also see how much CPU and memory resources are being used up by everything. I’ll be using Activity Monitor to fix my notification problem.

使用“活动监视器”,您可以看到Mac正在运行的所有内容,甚至包括在后台运行的东西,而您用肉眼无法看到这些东西。 您还可以查看所有组件正在消耗多少CPU和内存资源。 我将使用“活动监视器”修复我的通知问题。

Start off by firing up a Finder window and accessing your Applications.

首先启动Finder窗口并访问您的应用程序。

From there, open up the “Utilities” folder.

从那里打开“实用程序”文件夹。

Activity Monitor should be the first thing listed. Double-click it to load it up.

活动监视器应该是列出的第一件事。 双击将其加载。

In Activity Monitor, click the “Process Name” column header to sort all the processes alphabetically. This makes it easier to find Notification Center.

在活动监视器中,单击“进程名称”列标题以按字母顺序对所有进程进行排序。 这使查找通知中心变得更加容易。

You can also just type “Notification Center” into the search box up in the top-right corner and hit Return.

您也可以只在右上角的搜索框中输入“通知中心”,然后按回车键。

Once you find the Notification Center process, select it, and then click the “Stop Process” button (the icon is a stop sign with an X on it).

找到通知中心流程后,将其选中,然后单击“停止流程”按钮(该图标是带有X的停车标志)。

Click the “Quit” button when the confirmation pop-up appears.

出现确认弹出窗口时,单击“退出”按钮。

Notification Center shuts down and automatically restarts on its own. You should now receive notifications normally, and you might get an influx of backed up notifications that you didn’t receive before, so be prepared for that if it happens.

通知中心将关闭并自行自动重启。 现在,您现在应该可以正常接收通知了,并且您可能会收到大量以前从未收到的备份通知,因此请做好准备。

翻译自: https://www.howtogeek.com/348935/not-getting-macos-notifications-here’s-how-to-fix-it-without-rebooting/

macos 快速启动启动台

### 回答1: 在macOS中,启动台上的应用程序快捷方式通常存储在以下文件夹中: ``` ~/Applications ``` 要通过代码删除启动台上的应用程序快捷方式,可以使用以下步骤: 1. 打开Terminal应用程序 2. 使用以下命令进入应用程序文件夹: ``` cd ~/Applications ``` 3. 使用以下命令删除指定应用程序的快捷方式: ``` rm -rf 应用程序名称.app ``` 请注意,上述命令将彻底删除应用程序及其快捷方式,因此请确保您要删除的是正确的应用程序快捷方式。 ### 回答2: 要用代码删除macOS启动台的快捷方式,可以通过AppleScript编写一个脚本来实现。下面是一个示例代码: ```applescript tell application "System Events" tell dock preferences set the_dock to properties repeat with this_item in the_dock if (this_item is not folder) and (label of this_item is "应用程序的名称") then delete this_item end if end repeat set properties to the_dock end tell end tell ``` 上述代码中,首先使用AppleScript `tell application "System Events"` 声明将要与系统事件进行交互。然后,使用 `tell dock preferences` 来指定对Dock的操作。 在循环中,检查每个Dock中的项目,并根据需要匹配快捷方式的名称,例如替换 "应用程序的名称" 为实际的应用程序名称。如果找到匹配的项目,则使用 `delete` 删除它。 循环结束后,使用 `set properties to the_dock` 将对Dock的更改保存。 要运行这个脚本,可以创建一个新的AppleScript文件(使用Script Editor应用程序),将代码粘贴到文件中,然后点击运行按钮。这将删除Dock中名称匹配的快捷方式。 请注意,这个示例只适用于删除单个快捷方式。如果你有多个需要删除的快捷方式,可以在循环中添加更多的条件,并逐个删除它们。 希望这个回答能够帮助你删除macOS启动台的快捷方式。 ### 回答3: 在macOS中,我们可以使用代码来删除启动台的快捷方式。首先,我们需要使用AppleScript作为代码语言。 首先,打开Script Editor (脚本编辑器)应用程序。然后,我们可以编写以下代码: ``` tell application "System Events" tell dock preferences set properties to {persistent-apps: {}} end tell end tell ``` 这段代码使用AppleScript的`tell`语句来告诉System Events应用程序执行特定的操作。`tell`语句内的`dock preferences`则是告诉System Events我们要对Dock首选项进行操作。 接下来,我们使用`set properties to {persistent-apps: {}}`这行代码将启动台的快捷方式设置为空数组。这样,就删除了所有的快捷方式。 完成代码编写后,点击Script Editor (脚本编辑器)窗口上的"编译"按钮,确保没有错误。然后,点击"运行"按钮或使用快捷键`Command + R`执行脚本。 执行完脚本后,Dock即可删除所有的快捷方式。我们可以通过重新运行Dock 或者重启系统来恢复初始状态。 请注意,执行这段代码后,将会删除所有的快捷方式,包括任何你事先设置的常用应用程序。确保在运行代码之前备份好你的Dock设置。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值