Sunamu：在 Linux 桌面上显示当前播放音乐的歌词
Sunamu 音乐播放器
![](/data/attachment/album/202208/17/153701c3blbrgglfx7cfbr.jpg)


作为一个吸睛的**音乐小部件**（或控制器） —— 这是 Sunamu 唯一专注的事情，它工作得很好。


Sunamu 是一个有趣的工具。它不是音乐播放器，但可让你显示正在播放的音乐并对其进行控制。


我不喜欢在我的主要工作区使用浮动小部件，但 Sunamu 简约而优雅的方法改变了我的想法！


因此，我将向你介绍它的功能、安装、配置调整以及我的使用经验。


### Sunamu：开源音乐控制器


![playing music with sunamu](/data/attachment/album/202208/17/153732d5us5dnuztl5olpu.png)


正如你在上面的截图中所注意到的，它看起来是一种显示正在播放的音乐的非常好的方式，带有歌词，同时具有基本的控件。


你可以播放/暂停、转到下一首/上一首曲目、随机播放和启用循环。


Sunamu 支持多种音频平台，包括 Spotify。它还可以检测本地收藏中的音乐，支持一些可用于 Linux 的 [最佳音乐播放器](https://itsfoss.com/best-music-players-linux/)。


此外，它还支持 Windows。因此，如果你通过 Windows 上的 Edge 浏览器流式传输某些内容，它应该可以正常工作。


你可以查看其 GitHub 页面上的 [兼容性列表](https://github.com/NyaomiDEV/Sunamu/blob/master/COMPATIBILITY.md) 以了解有关支持的播放器和浏览器的更多信息。


幸运的是，你不必受限于它默认提供的功能。它提供了一种调整配置文件的简单方法（在其 [GitHub 页面](https://github.com/NyaomiDEV/Sunamu/blob/master/assets/config.json5) 上可以了解更多信息）。这使得新手可以调整一些设置并获得乐趣。


我将在本文的后面部分提到一些关于它的技巧。


### Sunamu 的特点


![Sunamu on empty workspace](/data/attachment/album/202208/17/153229jwl4lkl7zfwhkllf.jpg)


Sunamu 具有一些不错的特性，其中一些是：


* 检测并显示当前正在播放的歌曲。
* 从专辑封面中获取配色方案，并使用相同的调色板以获得更好的视觉效果。
* 可通过配置文件进行定制。
* 与 Discord 完美集成。
* 消耗最少的系统资源。


### 在 Linux 上安装 Sunamu


![Disable lyrics in sunamu](/data/attachment/album/202208/17/153236k212u7jiebcl12ef.jpg)


它提供 AppImage、deb 和 rpm 包，以便在各种 Linux 发行版中轻松安装。我使用 AppImage 进行测试，并且非常好用。


如果你是 Linux 新手，你还可以从我们关于 [如何使用 AppImage](https://itsfoss.com/use-appimage-linux/) 或 [安装 deb 包](https://itsfoss.com/install-deb-files-ubuntu/)、[rpm 包](https://itsfoss.com/install-rpm-files-fedora/) 的指南中得到帮助。


有趣的是，Sunamu 是少数为基于 ARM 的机器提供直接支持的开源音乐工具之一。


访问他们的 [GitHub 发布页面](https://github.com/NyaomiDEV/Sunamu/releases/tag/v2.0.0)下载包或从源代码构建它。


**让我通过终端向你展示基于 Debian 的发行版的快速安装方法**。只需按照给定的说明进行操作，你就可以开始使用了：


首先，让我们使用 `wget` 命令下载 .deb 包，如下所示：



```
wget https://github.com/NyaomiDEV/Sunamu/releases/download/v2.0.0/sunamu_2.0.0_amd64.deb

```

下载完包后，使用给定的命令进行安装：



```
sudo dpkg -i sunamu_2.0.0_amd64.deb

```

![install sunamu in ubuntu](/data/attachment/album/202208/17/153244rcmc0p1h4c160c66.jpg)


### 技巧：调整配置文件


默认情况下，Sunamu 不会从专辑封面中获取颜色，而是显示每首歌曲的歌词。和许多其他人一样，我喜欢不看歌词。


Sunamu 的配置文件通常位于 `~/.config/sunamu/config.json5`。


要打开 Sunamu 配置文件，请输入给定的命令：



```
nano ~/.config/sunamu/config.json5

```

如下所示在 `electron` 部分进行更改（启用颜色并禁用歌词）：



```
electron: {
      type: 'electron',
      widgetMode: true,
      colors: true,
      font: '',
      theme: 'default',
      showLyrics: false,
    }

```

这是最终配置文件的样子：


![modify config file of sunamu](/data/attachment/album/202208/17/153251lt1d79crrtd48jpj.jpg)


### 总结


除非你是避免使用基于 Electron 应用的人，否则 Sunamu 是一款足以增强你在 Linux 上的音乐体验的应用。继 [Amberol](https://itsfoss.com/amberol-music-player/) 之后，这是我最近喜欢的第二款音乐相关应用。


如果你尝试过，请不要忘记在评论部分分享你的经验。




---


via: <https://itsfoss.com/sunamu-music-widget/>


作者：[Sagar Sharma](https://itsfoss.com/author/sagar/) 选题：[lkxed](https://github.com/lkxed) 译者：[geekpi](https://github.com/geekpi) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
Being an eye candy **music widget** (or controller).

That’s the only focus of Sunamu, and it does its job pretty well.

Sunamu is an intriguing tool. It is not a music player but lets you display the music you’re playing and control it.

I’m not a fan of having a floating widget on my primary workspace, but Sunamu’s minimal yet elegant approach changed my mind!

So, I will walk you through its features, installation, configuration tweaks, and my experience with it.

## Sunamu: An Open-Source Music Controller

As you can notice in the screenshot above, it looks like a pretty nice way to display the music being played, with the lyrics, while having the basic controls.

You can play/pause, go to the next/previous track, shuffle, and enable a loop.

Sunamu supports a wide range of audio platforms, including Spotify. It also detects music from your local collection, supporting some of the [best music players](https://itsfoss.com/best-music-players-linux/) available for Linux.

Additionally, it supports Windows. So, if you are streaming something through the Microsoft Edge browser on Windows, it should work well.

You can check the [compatibility list](https://github.com/NyaomiDEV/Sunamu/blob/master/COMPATIBILITY.md) on its GitHub page to learn more about the supported players and browsers.

Fortunately, you do not have to be limited by what it offers by default. It provides an easy way to tweak the config file (learn more about it on its [GitHub page](https://github.com/NyaomiDEV/Sunamu/blob/master/assets/config.json5)). This makes it possible for newbies to tweak some settings and have fun.

I’ll mention a few tips about it in the later section of this article.

## Features of Sunamu

Sunamu comes with a set of promising features, and some of them are:

- Detects and display the song that is currently playing.
- Fetch color schemes from the album art and use the same color palette for better visuals.
- Customizable through its config file.
- Integrates well with Discord.
- Consumes minimal system resources.

## Install Sunamu on Linux

It provides AppImage, deb, and rpm packages for easy installation across various Linux distributions. I used AppImage for testing, and it worked like a charm.

You can also benefit from our guide on [how to use AppImage](https://itsfoss.com/use-appimage-linux/) or [install deb packages](https://itsfoss.com/install-deb-files-ubuntu/) and [rpm packages](https://itsfoss.com/install-rpm-files-fedora/), if you are new to Linux.

Interestingly, Sunamu is one of the few open-source music tools that provide direct support for ARM-based machines.

Visit their [GitHub releases page](https://github.com/NyaomiDEV/Sunamu/releases/tag/v2.0.0) to download packages or build it from the source.

**Let me show you a quick installation method** for a Debian-based distro via the terminal. Just follow the given instructions, and you’ll be good to go:

First, let’s download the .deb package using wget command as follows:

`wget https://github.com/NyaomiDEV/Sunamu/releases/download/v2.0.0/sunamu_2.0.0_amd64.deb`


Once you are done downloading the package, use the given command for installation:

`sudo dpkg -i sunamu_2.0.0_amd64.deb`


## Tip: Tweak the Configuration file

By default, Sunamu won’t fetch colors from the album art but show the lyrics for each song. And like many others, I like to avoid reading lyrics.

Config file of Sunamu is usually located at **~/.config/sunamu/config.json5**.

To open the Sunamu config file, type the given command:

`nano ~/.config/sunamu/config.json5`


Make changes in the electron section as given below (to enable colors and disable lyrics):

```
electron: {
type: 'electron',
widgetMode: true,
colors: true,
font: '',
theme: 'default',
showLyrics: false,
}
```


Here’s what the final config file should look like:

## Final Thoughts

Unless you are someone who avoids electron-based apps, Sunamu is a good enough app to enhance your music experience on Linux. After, [Amberol](https://itsfoss.com/amberol-music-player/), this is the second Music-related app I have liked recently.

If you try it, don’t forget to share your experience in the comment section.