? System Music Notification Toast
将您当前正在播放的音乐以 Minecraft 通知提示的形式显示出来。
功能介绍
System Music Notification Toast (SMN Toast) 是一款适用于 Fabric 和 NeoForge 的客户端模组,它能够检测系统中正在播放的音乐,并在 Minecraft 内以通知提示(Toast)的形式展示出来。当新曲目开始播放时,您会看到一个显示歌曲标题和艺术家名称的“正在播放”通知提示。
特性
- 自动通知 — 每当有新曲目开始播放时,都会弹出通知提示
- 手动触发 — 可配置按键绑定以按需显示当前曲目(默认未绑定)
- 简洁设计 — 采用原版 Minecraft 的通知提示样式
- 跨平台支持 — 兼容 Windows、Linux 和 macOS
平台支持
| 平台 |
方法 |
要求 |
| Windows |
SMTC(系统媒体传输控制) |
无需额外要求(内置) |
| Linux |
通过 D-Bus 使用 MPRIS |
无需额外要求(原生支持)或使用 playerctl(非 Flatpak 版本) |
| Linux (Flatpak) |
通过 D-Bus 使用 MPRIS |
需授予权限(见下文) |
| macOS |
AppleScript |
需授予权限(见下文) |
使用方法
- 将模组安装到 Fabric 或 NeoForge 的
mods 文件夹中
- 在任何兼容的音乐播放器中开始播放音乐
- 当新曲目开始时,会自动弹出通知提示
若要手动显示当前曲目,请在「选项 → 控制设置 → 按键绑定 → System Music Notification Toast」中绑定一个按键。
兼容播放器
- Windows: Spotify、Windows Media Player、浏览器媒体控件(Edge/Chrome)、foobar2000,以及任何支持 SMTC 的应用程序
- Linux: Spotify、VLC、Firefox、Chromium,以及任何支持 MPRIS 协议的播放器
- macOS: Spotify、Music.app(Spotify 优先级更高)
Flatpak 用户(Linux)
如果您使用的是 Flatpak 启动器(例如 PrismLauncher),则需要授予模组与媒体播放器通信的权限。
运行以下命令:
flatpak override --user org.prismlauncher.PrismLauncher '--talk-name=org.mpris.MediaPlayer2.*'
或者使用 Flatseal:
- 打开 Flatseal 并选择您的启动器(例如 PrismLauncher)
- 进入 Session Bus → Talk
- 添加
org.mpris.MediaPlayer2.*
应用权限后,请重新启动启动器。
注意:此权限仅允许与媒体播放器进行通信——它不会授予对主机系统执行命令的访问权限。
macOS 权限
macOS 会提示您允许 Minecraft(或您的启动器)控制 Spotify 和/或 Music.app。请允许该操作以启用曲目检测功能。
如果您之前拒绝了该请求,请前往「系统设置 → 隐私与安全性 → 自动化」,并为您的启动器或 Minecraft 启用访问权限。
? System Music Notification Toast
Display your currently playing music as a Minecraft toast notification.
What it does
System Music Notification Toast (SMN Toast) is a client-side mod for Fabric and NeoForge that detects music playing on your system and displays it as a toast notification in Minecraft. When a new track starts playing, you'll see a "Now Playing" toast showing the song title and artist name.
Features
- Automatic notifications — A toast appears whenever a new track starts playing
- Manual trigger — Configurable keybind to show the current track on demand (unbound by default)
- Clean design — Uses the vanilla Minecraft toast style
- Cross-platform — Works on Windows, Linux and macOS
Platform Support
| Platform |
Method |
Requirements |
| Windows |
SMTC (System Media Transport Controls) |
None (built-in) |
| Linux |
MPRIS via D-Bus |
None (native) or playerctl (non-Flatpak) |
| Linux (Flatpak) |
MPRIS via D-Bus |
Permission grant (see below) |
| macOS |
AppleScript |
Permission grant (see below) |
How to use
- Install the mod in your Fabric or NeoForge mods folder
- Start playing music in any compatible player
- A toast will appear when a new track starts
To manually show the current track, bind a key in Options → Controls → Key Binds → System Music Notification Toast.
Compatible Players
- Windows: Spotify, Windows Media Player, browser media (Edge/Chrome), foobar2000, and any app using SMTC
- Linux: Spotify, VLC, Firefox, Chromium, and any MPRIS-compatible player
- macOS: Spotify, Music.app (Spotify has higher priority)
Flatpak Users (Linux)
If you're using a Flatpak launcher (like PrismLauncher), you need to grant permission for the mod to communicate with media players.
Run this command:
flatpak override --user org.prismlauncher.PrismLauncher '--talk-name=org.mpris.MediaPlayer2.*'
Or using Flatseal:
- Open Flatseal and select your launcher (e.g., PrismLauncher)
- Go to Session Bus → Talk
- Add
org.mpris.MediaPlayer2.*
Restart the launcher after applying the permission.
Note: This permission only allows communication with media players — it does not grant access to run commands on your host system.
macOS Permission
macOS will prompt you to allow Minecraft (or your launcher) to control Spotify and/or Music.app. Allow it to enable track detection.
If you denied it previously, go to System Settings → Privacy & Security → Automation and enable access for your launcher or Minecraft.
(Thanks to NatsuCamellia for the macOS support <3)
评论 0
登录后参与评分
还没有评论,来抢沙发吧