Skip to content

Commit

Permalink
Version 1.0 (#1)
Browse files Browse the repository at this point in the history
Restructured the module. It now only evaluated the selected theme. Themes, extensions, and apps all have types now, which can be used to define custom ones. A majority of themes and extensions have been packaged for easy installation. Additionally, you can define custom color schemes for your theme, as shown in the README's "maximum configuration."
  • Loading branch information
the-argus authored Aug 9, 2022
1 parent ec68312 commit c6bac08
Show file tree
Hide file tree
Showing 9 changed files with 1,481 additions and 246 deletions.
17 changes: 17 additions & 0 deletions CUSTOMAPPS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Custom Apps

## Official Apps

### new-releases
Add a page showing new releases from artists you follow.

### reddit
Add a page showing popular music on certain music subreddits.

### lyrics-plus
Add a page with pretty scrolling lyrics.

## Community Apps

### localFiles
Add a shortcut to see just your local files.
126 changes: 126 additions & 0 deletions EXTENSIONS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# Extensions
Not all of these work properly. See the warning in the README.

## Official Extensions

### fullAppDisplay.js
Shows the song cover, title, and artist in fullscreen.

### autoSkipExplicit.js
Christian spotify!

### autoSkipVideo.js
Video playback (ads and stuff) causes problems in some regions where the videos can't be played. Just skip them with this extension.

### bookmark.js
Store and browse pages for looking at later.

### keyboardShortcut.js
Vimium-like navigation of spotify. See keyboard shortcuts [here.](https://spicetify.app/docs/advanced-usage/extensions#keyboard-shortcut)

### loopyLoop.js
Specify a portion of track to loop over.

### popupLyrics.js
Open a popup window with the current song's lyrics scrolling across it.

### shuffle+.js
Shuffle properly, using Fisher-Yates with zero bias.

### trashbin.js
Throw artists or songs in the trash, and permanently skip them.

### webnowplaying.js
Only useful to windows/rainmeter users, I think. [Reference](https://spicetify.app/docs/advanced-usage/extensions#web-now-playing)

## Community Extensions

### groupSession.js
Allows you to create a link to share with your friends to listen along with you.

### powerBar.js
Spotlight-like search bar for spotify.

### seekSong.js
Allows for youtube-like seeking with keyboard shortcuts.

### skipOrPlayLikedSongs.js
Set spotify to automatically skip liked songs, or to only play liked songs.

### playlistIcons.js
Give your playlists icons in the left sidebar.

### fullAlbumDate.js
Display the day and month of an album's release, as well as the year.

### fullAppDisplayMod.js
Same as fullAppDisplay.js, but with slight offset, and scrolling lyrics if using the lyrics-plus customapp.

### goToSong.js
Adds an option to the profile menu to go to the currently playing song or playlist.

### listPlaylistsWithSong.js
Adds an option to the context menu for songs to show all of your account's playlists which contain that song.

### playlistIntersection.js
Compare two playlists, and create a new playlist containing their common songs, or only the songs unique to one playlist.

### skipStats.js
Track your skips.

### phraseToPlaylist.js
Given a phrase, this extension will make a playlist containing a series of songs which make up that phrase.

### fixEnhance.js
A patch to the "enhance playlist" option which spotify themselves has already fixed, but could be useful in older versions.

### wikify.js
Show an artist's wikipedia entry.

### featureShuffle.js
Create a playlist based off another playlist's audio features.

### songStats.js
Show a song's stats, like dancability, tempo, and key.

### autoVolume.js
Automatically adjust volume over long periods of time, to reduce ear strain.

### showQueueDuration.js
Show the total length of all songs currently queued.

### copyToClipboard.js
Adds an option in the context menu to copy a song's name to your clipboard.

### volumeProfiles.js
Edit and save settings related to volume to different "profiles."

### history.js
Adds a page that shows your listening history.

### lastfm.js
Integration with last.fm. Login to show your listening stats for a song, and get its last.fm link.

### genre.js
Display the genre of an artist or song while playing.

### hidePodcasts.js
Remove everything from the spotify UI relating to podcasts.

### adblock.js
Remove ads.

### savePlaylists.js
More than just just following a playlist, this extension allows you to also create a duplicate of the playlist in your own library.

### autoSkip.js
Automatically skip certain songs by category, such as remixes, or christmas songs.

### fullScreen.js
Similar to fullAppDisplay.js.

### playNext.js
Add track to the *top* of the queue.

### volumePercentage.js
Adds a percentage number next to the volume adjustment slider, and allows for more fine control of volume.
163 changes: 133 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,65 +1,168 @@
# Spicetify-Nix
# Warning: Spotify Sucks
Linux is a second class citizen on Spotify's release plan, but because it isn't FOSS, there's nothing we can do. Right now a lot of themes and extensions don't work because spotify isn't up to date on Linux. This includes Dribbblish :(

# Warning: Spotify sucks
Spotify isn't FOSS and linux is a second class citizen on its release plan.
Right now a lot of themes and extensions don't work because spotify isn't up
to date on Linux. This includes Dribbblish :(
# Spicetify-Nix

Modifies Spotify using [spicetify-cli](https://github.com/khanhas/spicetify-cli).

[spicetify-themes](https://github.com/morpheusthewhite/spicetify-themes) are included and available.

# Usage

To use, add this flake to your home-manager configuration flake inputs, like so:
```nix
{
inputs.spicetify-nix = {
url = "github:the-argus/spicetify-nix";
};
inputs.spicetify-nix.url = "github:the-argus/spicetify-nix";
}
```
## Configuration examples

An example of a file which configures spicetify when imported into
a users home-manager configuration:
Here are two examples of files which configures spicetify when imported into a users home-manager configuration.

### Minimal Configuration
```nix
{ pkgs, spicetify-nix, ... }:
{ pkgs, unstable, lib, spicetify-nix, ... }:
{
# allow spotify to be installed if you don't have unfree enabled already
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"spotify-unwrapped"
];
# import the flake's module
imports = [ spicetify-nix.homeManagerModule ];
# configure spicetify :)
programs.spicetify =
let
hidePodcasts = pkgs.fetchgit {
url = "https://github.com/theRealPadster/spicetify-hide-podcasts";
rev = "cfda4ce0c3397b0ec38a971af4ff06daba71964d";
sha256 = "146bz9v94dk699bshbc21yq4y5yc38lq2kkv7w3sjk4x510i0v3q";
};
in
{
enable = true;
theme = "Dribbblish";
colorScheme = "rosepine";
enabledCustomApps = [ ];
# recommended to use newest version of spicetify unless you know what you're doing
spicetifyPackage = unstable.spicetify-cli;
theme = "catppuccin-mocha";
# OR
# theme = spicetify-nix.pkgs.themes.catppuccin-mocha;
colorScheme = "flamingo";
enabledExtensions = [
"fullAppDisplay.js"
"shuffle+.js"
"hidePodcasts.js"
];
#
# thirdPartyCustomApps = {
# localFiles = "${localFiles}";
# };
#
thirdPartyExtensions = {
hidePodcasts = "${hidePodcasts}/hidePodcasts.js";
};
}
```

### MAXIMUM CONFIGURATION
WARNING: Do not copy + paste this configuration. The "enabledCustomApps" causes spotify to give the "something went wrong" page eternally. This configuration is only meant as an example.
```nix
{ pkgs, unstable, lib, spicetify-nix, ... }:
{
# allow spotify to be installed if you don't have unfree enabled already
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"spotify-unwrapped"
];
# import the flake's module
imports = [ spicetify-nix.homeManagerModule ];
# configure spicetify :)
programs.spicetify =
let
# use a different version of spicetify-themes than the one provided by
# spicetify-nix
officialThemesOLD = pkgs.fetchgit {
url = "https://github.com/spicetify/spicetify-themes";
rev = "c2751b48ff9693867193fe65695a585e3c2e2133";
sha256 = "0rbqaxvyfz2vvv3iqik5rpsa3aics5a7232167rmyvv54m475agk";
};
# pin a certain version of the localFiles custom app
localFilesSrc = pkgs.fetchgit {
url = "https://github.com/hroland/spicetify-show-local-files/";
rev = "1bfd2fc80385b21ed6dd207b00a371065e53042e";
sha256 = "01gy16b69glqcalz1wm8kr5wsh94i419qx4nfmsavm4rcvcr3qlx";
};
in
{
# use spotify from the nixpkgs master branch
spotifyPackage = unstable.spotify-unwrapped;
# use a custom build of spicetify, also an old version.
spicetifyPackage = import ../../packages/spicetify-cli-2.9.9.nix { inherit pkgs; };
# actually enable the installation of spotify and spicetify
enable = true;
# custom Dribbblish theme
theme = {
name = "Dribbblish";
src = officialThemesOLD;
requiredExtensions = [
# define extensions that will be installed with this theme
{
# extension is "${src}/Dribbblish/dribbblish.js"
filename = "dribbblish.js";
src = "${officialThemesOLD}/Dribbblish";
}
];
appendName = true; # theme is located at "${src}/Dribbblish" not just "${src}"
# changes to make to config-xpui.ini for this theme:
patches = {
"xpui.js_find_8008" = ",(\\w+=)32,";
"xpui.js_repl_8008" = ",$\{1}56,";
};
injectCss = true;
replaceColors = true;
overwriteAssets = true;
sidebarConfig = true;
};
# specify that we want to use our custom colorscheme
colorScheme = "custom";
# color definition for custom color scheme. (rosepine)
customColorScheme = {
text = "ebbcba";
subtext = "F0F0F0";
sidebar-text = "e0def4";
main = "191724";
sidebar = "2a2837";
player = "191724";
card = "191724";
shadow = "1f1d2e";
selected-row = "797979";
button = "31748f";
button-active = "31748f";
button-disabled = "555169";
tab-active = "ebbcba";
notification = "1db954";
notification-error = "eb6f92";
misc = "6e6a86";
};
# BROKEN AT TIME OF WRITING
enabledCustomApps = with spicetify-nix.pkgs.apps; [
new-releases
{
name = "localFiles";
src = localFilesSrc;
appendName = false;
}
];
enabledExtensions = with spicetify-nix.pkgs.extensions; [
"playlistIcons.js"
"lastfm.js"
"genre.js"
"historyShortcut.js"
"hidePodcasts.js"
"fullAppDisplay.js"
"shuffle+.js"
];
};
}
```

To add third-party themes, extensions or custom apps use `thirdPartyThemes`, `thirdParyExtensions` or `thirdParyCustomApps`. These expect a set, where the key is the name of the new theme/extension and the value the path. Don't forget to enable it separately.
## Themes, Extensions, and CustomApps

For all available options, check module.nix or package.nix and the spicetify repo. Everything is optional and will revert to the defaults from spicetify.
Are found in [THEMES.md](./THEMES.md), [EXTENSIONS.md](./EXTENSIONS.md), and [CUSTOMAPPS.md](./CUSTOMAPPS.md), respectively.

## macOS
This package has no macOS support, because Spotify in nixpkgs has no macOS support.
Loading

0 comments on commit c6bac08

Please sign in to comment.