0
0
mirror of https://github.com/cucumber-sp/yandex-music-linux.git synced 2024-12-23 14:12:59 +03:00
Repacked Electron client of Yandex Music for Linux
Go to file
2024-11-16 00:44:03 +00:00
.github/workflows Remove RN generation on repack 2024-10-30 18:41:53 +03:00
icons Better Icons 2024-03-07 22:16:25 +03:00
nix [nix] Fix configuration 2024-05-22 16:16:49 +03:00
patches Patch fix 2024-10-15 15:18:22 +03:00
templates Update executable for wayland 2024-10-03 19:47:48 +03:00
utility Update packages 2024-11-16 00:44:03 +00:00
.gitignore RPM Building Support 2024-03-09 21:09:26 +03:00
build_deb.sh Build Tarballs 2024-03-09 12:37:35 +03:00
build_rpm.sh RPM Building Support 2024-03-09 21:09:26 +03:00
build_tarball.sh [nix] Fix configuration 2024-05-22 16:16:49 +03:00
flake.lock Update packages 2024-11-16 00:44:03 +00:00
flake.nix Update packages 2024-11-16 00:44:03 +00:00
LICENSE.md Swtiched to .asar + PKGBUILD generation 2024-01-29 21:41:52 +03:00
PKGBUILD Update packages 2024-11-16 00:44:03 +00:00
README.md Move screenshots on top 2024-11-09 14:15:41 +03:00
repack.sh Remove RN generation on repack 2024-10-30 18:41:53 +03:00

yandex-music-linux

About

Native YandexMusic client for Linux. Built using repacking of Windows client (Electron app).

Screenshots

image image

Table of content

Installation

Arch Linux

AUR

You can obtain the latest version of package from AUR using one of the AUR Helpers. Then install it with yandex-music as package name.

For this example I will use yay

yay -S yandex-music

Binary package file

Download prebuilt binary package from Releases section.

Then you can install it with the following command

pacman -U yandex-music-<version>-any.pkg.tar.zst

Debian/Ubuntu

APT

Download key and add repository to mirror list

curl -fsSL https://apt.cucumber-space.online/key.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/cucumber-space.key.gpg
echo 'deb [signed-by=/etc/apt/keyrings/cucumber-space.key.gpg] https://apt.cucumber-space.online ./' | sudo tee /etc/apt/sources.list.d/cucumber-space.list > /dev/null
sudo apt update

Then you can install app with

sudo apt install yandex-music

Binary package file

Download prebuilt binary package from Releases section.

Then you can install it with the following command

dpkg -i yandex-music_<version>_<arch>.deb

RPM-based

DNF

Package is currently unavailable at DNF. If you'd like to help us with publishing, feel free to open new issue.

Binary package file

Download prebuilt binary package from Releases section. Unfortunatelly, we only provide packages for x64 architecture. If you need package for different architecture, you can build it manually.

Then you can install it with the following command

rpm -i yandex-music-<version>-1.x86_64.rpm

Configuration

Configuration file

You can find configuration file at HOME/.config/yandex-music.conf. It's a simple key=value file that's sourced before launching the app. This means you can set environment variables and other options there.


Custom Electron binary

You can set path to custom Electron binary with ELECTRON_CUSTOM_BIN option. For example:

ELECTRON_CUSTOM_BIN=/usr/bin/electron

Electron arguments

You can set custom Electron flags with ELECTRON_ARGS option. By default it's set to --no-sandbox. For example:

ELECTRON_ARGS="--no-sandbox --trace-warnings"

Tray mode

Tray mode is disabled by default. It allows program to be minimized to tray instead of closing. To enable it set TRAY_ENABLED option to 1.

image


Dev tools

Chromium developer/debug tools can be enabled by setting DEV_TOOLS option to 1.


Custom title bar

Yandex Music's custom Windows-styled titlebar can be enabled by setting CUSTOM_TITLE_BAR option to 1. Also makes the window frameless.

image


Manual Build

Prerequisites

That's the list of packages you might need to install to be able to manually build the app. However, you should remember that it might be different for your distro/machine.

- nodejs
- npm
- jq
- 7z (p7zip)
- unzip
- python

In addition you will need to install Asar tool with npm. I recommend install it globally with the following command

npm install -g @electron/asar

Last step is to download original client .exe file. You can get it yourself or take link to the latest version from ./utility/version_info.json file.


Extract app only

If you only want to get extracted app project with applied patches, you can use the following command:

bash repack.sh -x [-o OUTPUT_DIR default=./app] <YM.exe>

ASAR archive

.asar is archive file that containes all electron app resources and information, but doesn't hold Electron binaries. If you have .asar file you can launch app using electron <app>.asar. You can build this archive with the following command:

bash repack.sh [-o OUTPUT_DIR default=./app] <YM.exe>

Arch Linux

You can build pacman package file manually using PKGBUILD file from the this repository. Run following commands in folder with PKGBUILD file inside to get .pkg.tar.zst package:

pacman -S electron libpulse
makepkg

Debian/Ubuntu

You can build .deb binary package using the following command:

bash build_deb.sh  [-a <x64|armv7l|arm64|all> default=x64]

RPM-based

You can build .rpm binary package using the following command:

bash build_rpm.sh  [-a <x64|armv7l|arm64|all> default=x64]

Run with nix

The yandex-music package has unlicensed license, so you need to have allowUnfree option enabled.

NixOS unstable

The yandex-music package is available at nixos-unstable channel.

Run from unstable channel with flakes

nix run github:NixOS/nixpkgs/nixos-unstable#yandex-music

Install from unstable channel

Add next to your configuration:

environment.systemPackages = with pkgs; [ yandex-music ];

Overriding

There is several option of package available to override:

yandex-music.override {
    trayEnabled = true;     # Whenether to enable tray support
    electronArguments = ""; # Extra arguments to electron executable
}

Built-in module

This repository contains its own nix-related receipts.

Run with flakes

Execute next to build and run yandex music directly from github

nix run github:cucumber-sp/yandex-music-linux

Run old style

Execute next in this repository to build yandex-music package without using flakes.

nix-build --expr '(import <nixpkgs> {}).callPackage ./nix {}'

Install to NixOS

  1. Add input in your flake.nix

    inputs = {
      yandex-music.url = "github:cucumber-sp/yandex-music-linux";
    };
    
  2. Import module in your configuration.nix:

    imports = [
      yandex-music.nixosModules.default
    ];
    

    or in home-manager.nix:

    imports = [
      yandex-music.homeManagerModules.default
    ];
    
  3. Enable yandex-music

    programs.yandex-music.enable = true;
    programs.yandex-music.tray.enable = true; # to enable tray support
    

Star History

Star History Chart