Skip to content

ekrlstd/songfetch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

songfetch

A simple Linux CLI tool, very similar to something like neo/fastfetch, that displays current song information in the terminal using playerctl and MPRIS/MPRIS2.

Contributions and Issues are welcome!


2025-10-17-032127_hyprshot
More Images 2025-10-17-031524_hyprshot 2025-10-17-031901_hyprshot

Installation (Arch Linux):

You need to first manually install the package for ascii image conversion. You can install it from the AUR:

yay -S python-ascii_magic

or with pip/pipx:

pip install ascii-magic
or,
pipx install ascii-magic

Then install the full program:

yay -S songfetch

Dependencies:

python
python-pillow
python-ascii_magic (AUR) (or ascii-magic from pip/pipx)
playerctl

Player Compatibility

Works Out of the Box

Most players should work without any additional setup:

  • Spotify, VLC, Firefox, Chrome
  • Rhythmbox, Clementine, Strawberry
  • Any player that supports MPRIS2

Requires Additional Setup

Some terminal/daemon-based players need an MPRIS bridge installed:

Player Package to Install Command
MPD mpdris2 yay -S mpdris2 (Arch)
sudo dnf install mpdris2 (Fedora)
sudo apt install mpdris2 (Debian/Ubuntu)
cmus cmus Check your distro's package manager
moc moc-mpris Check your distro's package manager

After installing the bridge, enable it:

systemctl --user enable --now mpDris2  # for MPD
# enable similar services for other players

To start the playerctld daemon and set it to run on startup, run:

systemctl --user enable --now playerctld

If you get an error like Unit playerctld.service does not exist, or issues with player instances not updating correctly, create a user systemd service:

Create ~/.config/systemd/user/playerctld.service:

[Unit]
Description=playerctld daemon

[Service]
ExecStart=/usr/bin/playerctld daemon

[Install]
WantedBy=default.target

Reload user systemd and enable with:

systemctl --user daemon-reload
systemctl --user enable --now playerctld

If you see playerctld DBus service is already running, it means another instance is active. Kill it with:

pkill playerctld

Then restart the systemd service as above.

Notes

Album art colors will be displayed using ANSI terminal colors and will be affected by custom terminal color schemes (pywal, themes etc.), just like the other big fetching tools.

This program is designed to be used on actual songs, so running this while watching a YouTube video for example, might give unwanted results. This is due to the non- 1 to 1 aspect ratio of the "album art" (in this case, a YouTube thumbnail.

Thanks to Microck and Matars for contributing to this project!

Please star this repo if you liked it! ⭐

About

A Linux CLI tool, very similar to neofetch, that displays current song information in the terminal.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages