Skip to content

Repository files navigation

DesktopLyrics

A tool that

  • Has client side window decorations with native behavior (e.g., Windows Aero Snap) on Linux & Windows
  • Can recognize currently playing media on Linux via MPRIS
  • Was originally supposed to show synchronized lyrics of said media, but I abandoned the project before I could build this.

Executing

  1. Clone the repository
  2. Open a terminal and navigate to the repo's root folder
  3. On Linux, run ./run.sh. On Windows, it should be possible to simply run .\gradlew.bat run. If not, perform the steps in run.sh but for .\gradlew.bat instead of ./gradlew.
    • For some reason, using the gradlew run task on Linux leads to GTK crashing. I haven't figured out why yet.

Note that the newest supported Java version is Java 22. You can manually set the Java version for Gradle to use via ./gradlew run -Dorg.gradle.java.home=/path/to/java22. A compiled JAR file should be able to be run with a newer version of Java as well, though I still recommend sticking to Java 22.

This Project Is Unfinished

Currently, media recognition only works on Linux. There seems to be an API for this in Windows as well, though it is less straightforward. The native title bar however is also implemented for Windows.

Fetching and showing media is not implemented yet, though it should be as simple as querying an API with the current song title and artist. The API I plan to use for this is LRCLIB. This can be done easily in Kotlin using Ktor.

Why Use The JVM?

Since this project interacts with native libraries a lot and thus isn't particularly platform independent, it is a reasonable question to ask why I chose to use a JVM-based language. The answer is that

  1. I like Kotlin.
  2. I wanted to learn more about Kotlin.
  3. I wanted to learn a declarative GUI framework like Compose.
  4. The problem of having custom title bars with native functionality in the JVM haunts me since I was 16 (back then with Java and Swing), and I now finally have the skills to make it a reality.

I originally considered using Flutter instead, but preferred deepening my knowledge of Kotlin over learning Dart.

If I were to start another project like this, I would probably do it in Rust (because that's another language I want to learn) and GTK (because I use GNOME).

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages