Skip to content
re2zeroPublic

About

music app

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Romus

一个基于 GPUI 与 DTK 的本地/在线音乐播放器,界面使用 dtk-gpui v0.1.1 控件库实现。

A local and online music player built with gpui-kit and the dtk-gpui v0.1.1 widget library.

中文

Romus 是一个面向 Linux 桌面的音乐播放器:本地曲库、播放列表和播放状态保存在本机,同时可选接入网易云音乐,浏览发现页、歌单和收藏内容。窗口框架、标题栏、侧边栏、按钮、滑块与对话框全部由 DTK 控件绘制,并跟随系统的浅色/深色配色和字号设置。

功能

  • DTK 窗口框架、标题栏、侧边栏和播放控制条
  • 本地曲库、歌曲/专辑/艺术家浏览与搜索
  • 播放列表创建、重命名、删除,收藏(喜欢)与播放队列管理
  • 内嵌元数据、封面与 LRC 歌词解析(普通逐行 LRC 与带结束时间的 LRC)
  • Now Playing 页面:大封面、播放控制、可点击跳转的歌词
  • 播放队列与歌词侧边面板
  • Linux MPRIS 媒体状态,可被桌面面板和媒体键识别
  • 网易云音乐发现页、歌单、收藏歌单与喜欢的歌曲
  • 二维码登录与游客模式;试听歌曲会显示“试听”标记
  • 简体中文 / English 界面,可在设置中即时切换或跟随系统
  • 浅色、深色与跟随系统三种配色

运行

需要 Linux(X11 或 Wayland)、Rust 工具链,以及 GPUI 和音频输出所需的系统开发库。以 Debian/Deepin 为例:

sudo apt install build-essential pkg-config libasound2-dev libfontconfig1-dev \
    libwayland-dev libxkbcommon-dev libx11-xcb-dev
cargo run --release

启动后通过界面导入本地音频或 LRC 文件。程序记录原始文件路径,并将曲库、播放列表和播放器状态保存在本地配置目录。

界面语言默认跟随系统(LANGUAGE / LC_ALL / LC_MESSAGES / LANG),也可以到 设置 → 语言 即时切换;选择会写回 ~/.config/romus/config.toml。配色可在 设置 → 外观 或标题栏菜单中选择。

依赖

界面使用远端 git 依赖引入,并固定 revision 以保证可复现:

gpui-kit = "0.11.0"
dtk-gpui = { git = "https://github.com/re2zero/dtk-gpui.git", rev = "002e2b41f5b957067000500789d54d11b6d79bfa" }

音频播放与异步运行时分别由仓库内的 src/audio(cpal + symphonia)和 src/runtime.rs(Tokio 桥接)实现,不再依赖 gpui-fusion 的专用 crate。

在线音乐

在线音乐是可选功能。未登录时可以游客身份浏览发现页与歌单;部分歌曲只提供 30 秒试听,播放器会显示“试听”标记。登录后可同步喜欢的歌曲与收藏歌单。

  • 在线歌曲播放缓存:~/.cache/romus/online
  • 喜欢/收藏歌曲下载后的本地副本:~/.local/share/romus/online
  • 账号会话:~/.config/romus/online.toml(权限 0600)

English

Romus is a Linux desktop music player. The local library, playlists, and playback state stay on the machine, while optional NetEase Cloud Music integration adds discovery, playlists, and saved content. The window frame, title bar, sidebar, buttons, sliders, and dialogs are drawn with DTK widgets and follow the system light/dark palette and font size.

Features

  • DTK window frame, title bar, sidebar, and player bar
  • Local library with songs, albums, artists, and search
  • Playlist create/rename/delete, favorites, and play-queue management
  • Embedded metadata, artwork, and LRC lyrics (line-timed and end-time LRC)
  • Now Playing page with large artwork, transport controls, and click-to-seek lyrics
  • Play-queue and lyrics side panels
  • Linux MPRIS integration for desktop panels and media keys
  • NetEase Cloud Music discovery, playlists, saved playlists, and liked songs
  • QR-code sign-in and guest mode, with a “Trial” badge for preview-only tracks
  • English and Simplified Chinese UI, switchable in Settings or following the system locale
  • Light, dark, and follow-system color schemes

Run it

You need Linux (X11 or Wayland), a Rust toolchain, and the system development libraries required by GPUI and audio output. On Debian/Deepin:

sudo apt install build-essential pkg-config libasound2-dev libfontconfig1-dev \
    libwayland-dev libxkbcommon-dev libx11-xcb-dev
cargo run --release

After startup, import local audio or LRC files through the interface. The player records the original file paths and keeps the library, playlists, and player state in the local config directory.

The UI language follows the system locale (LANGUAGE / LC_ALL / LC_MESSAGES / LANG) by default. Switch it live in Settings → Language; the choice is written back to ~/.config/romus/config.toml. Change the color scheme in Settings → Appearance or from the title-bar menu.

Dependencies

The UI is pulled in as a remote git dependency pinned to a revision for reproducible builds:

gpui-kit = "0.11.0"
dtk-gpui = { git = "https://github.com/re2zero/dtk-gpui.git", rev = "002e2b41f5b957067000500789d54d11b6d79bfa" }

Audio playback and the async runtime live in this repository (src/audio using cpal + symphonia, and src/runtime.rs as the Tokio bridge), so the app no longer depends on the gpui-fusion-specific crates.

Online music

Online music is optional. Guest browsing covers discovery and playlists. Some tracks are limited to a 30-second preview and are marked “Trial”. Signing in syncs liked songs and saved playlists.

  • Online playback cache: ~/.cache/romus/online
  • Local copies of liked/saved tracks: ~/.local/share/romus/online
  • Account session: ~/.config/romus/online.toml (mode 0600)

License and credits

本项目采用 MIT License。

This project is available under the MIT License.

About

music app

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages