GithubHelp home page GithubHelp logo

henrynguyen5 / spicetify-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from spicetify/cli

0.0 2.0 0.0 730 KB

Commandline tool to customize Spotify client. Supports Windows, MacOS and Linux.

License: GNU General Public License v3.0

JavaScript 96.08% CSS 0.98% HTML 0.15% PowerShell 0.28% Go 2.51%

spicetify-cli's Introduction

spicetify-cli

Go Report Card GitHub release Github All Releases Join the community on Spectrum

Command-line tool to customize Spotify client. Supports Windows, MacOS and Linux.

Features

  • Change colors whole UI
  • Inject CSS for advanced customization
  • Inject Extensions (Javascript script) to extend functionalities, manipulate UI and control player.
  • Enable some additional, hidden features
  • Remove bloated components to improve performance

mac_demo1

majaro_demo1

Install

Homebrew/LinuxBrew

brew install khanhas/tap/spicetify-cli

AUR

yay spicetify-cli

Windows (pre-built)

Open Powershell, run:

iwr https://raw.githubusercontent.com/khanhas/spicetify-cli/master/install.ps1 | iex

Linux or MacOS (prebuilt)

  1. Download linux or darwin package from: https://github.com/khanhas/spicetify-cli/releases
  2. In terminal, run following commands:
mkdir ~/spicetify
tar xzf ~/Downloads/spicetify-x.x.x-linux-amd64.tar.gz -C ~/spicetify

with ~/Downloads/spicetify-xxx.tar.gz is direct path to just downloaded package.

Optionally, run:

sudo ln -s ~/spicetify/spicetify /usr/bin/spicetify

Now you can run spicetify everywhere.

Note for Linux users

Spotify installed from AUR

Before applying Spicetify, you need to gain write permission on Spotify files, by running command:

sudo chmod 777 /usr/share/spotify -R
Spotify installed from Snap

Apps installed from Snap cannot be modified so you need to follow these steps to get Spicetify working:

  1. Uninstall Spotify in Snap or run command snap remove spotify
  2. Remove .spicetify folder: rm -r ~/.spicetify
  3. Open http://repository.spotify.com/pool/non-free/s/spotify-client/
    You can see there are 2 deb files, for i386 and amd64. You should pick amd64 if your Ubuntu is 64bit version because seems like they stopped upgrading the client for i386.
  4. Install deb file you just downloaded with Ubuntu Software. Might take a bit.
  5. After Spotify's installed successfully, you need to gain write permission on Spotify files, by running command:
sudo chmod 777 /usr/share/spotify -R

Basic usage

Run with no command once to generate config file

spicetify

Make sure config file is created successfully and there is no error, then run:

spicetify backup apply enable-devtool

From now, after changing colors in color.ini or CSS in user.css, you just need to run:

spicetify update

to update your theme.

In Spotify, hit Ctrl Shift R/Command Shift R to reload and receive visual update of your theme.

For other commands and additional flags information, please run:

spicetify --help

Customization

Configs

Config file is located at:
Windows: %userprofile%\.spicetify\config.ini
Linux: ~/.spicetify/config.ini
MacOS: ~/spicetify_data/config.ini

For detail information of each config field, please run:

spicetify --help config

Themes

There are 2 places you can put your themes:

  1. Themes folder in Home directory

Windows: %userprofile%\.spicetify\Themes\
Linux: ~/.spicetify/Themes/
MacOS: ~/spicetify_data/Themes

  1. Themes folder in Spicetify executable directory

If there are 2 themes having same name, theme in Home directory is prioritized.

Every theme should contain:

  • color.ini: store colors value that later will be converted to CSS variables
  • user.css: set of custom CSS rules to manipulate, hide, move UI elements.

Extensions

Basically are Javascript files that will be evaluated along with Spotify main javascript. Add your desired extension filenames in config, separated them by | character.
Example:

[AdditionalOptions]
...
extensions = autoSkipExplicit.js|queueAll.js|djMode.js|shuffle+.js|trashbin.js

Extension files can be store in:

  • Extensions folder in Home directory:
    Windows: %userprofile%\.spicetify\Extensions\
    Linux: ~/.spicetify/Extensions/
    MacOS: ~/spicetify_data/Extensions
  • Extensions folder in Spicetify executable directory.

If there are 2 extensions having same name, extension in Home directory is prioritized.

Some Spotify API are leaked and put in global object Spicetify. Check out global.d.ts for API documentation.

Below are list of default extensions that comes with package:

Auto Skip Videos

Filename: autoSkipVideo.js
Videos are unable to play in some regions because of Spotify's policy. Instead of jumping to next song in playlist, it just stops playing. And it's kinda annoying to open up the client to manually click next every times it happens. Use this extension to skip them automatically.

Christian Spotify

Filename: autoSkipExplicit.js
Auto skip explicit tracks

Ext_ChristianDemo

DJ Mode

Filename: djMode.js
Easily setting up the client for your friends or audiences to choose, add song to queue but prevent them to control player. Plays button in album track list/playlist are re-purposed to add track to queue, instead of play track directly. Hide Controls option also allow you to hide all control button in player bar, Play/More/Follow buttons in cards.

Ext_DJDemo

Queue All

Filename: queueAll.js
You like using Discover, New Releases page to find new music but adding each one of them to queue takes a lot of effort? If so, activate this extensions and apply. At top of every carousel now has a "Queue All" button to help you add all of them to queue. Note: Not available for playlist carousels. Just songs, albums ones.

QueueAllDemo

Shuffle+

Filename: shuffle+.js
Detect current context (playlist, album, user collection or show), gather all its items and shuffle them with Fisher–Yates algorithm. After injecting this extension, go to Queue and you can find 2 new buttons at page header: - Shuffle Context: detect current context and shuffle all its item. - Shuffle Queue: shuffle only 80 items or less that are visible in Queue page. It's only useful for mixed context queue. For most of the time, just use Shuffle Context.

Shuffle_1 Shuffle_2

Trash Bin

Filename: trashbin.js
Throw songs/artists to trash bin and never hear them again (automatically skip). This extension will append a trash bin button in player bar and one in every artist page header. Button in player bar will immediately skip and add that song to trash list. Button in artist page will add that artist in trash list and skip whenever his/her songs play.

Ext_Trash1 Ext_Trash2

Development

Requirements

Clone repo and download dependencies:

cd $HOME
git clone https://github.com/khanhas/spicetify-cli

Build

Windows

cd $HOME\spicetify-cli
go build -o spicetify.exe

Linux and MacOS

cd ~/spicetify-cli
go build -o spicetify

Future

  • SASS
  • Inject custom apps

spicetify-cli's People

Contributors

khanhas avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.