diff --git a/home-modules/pkgs-list/programs.nix b/home-modules/pkgs-list/programs.nix index c936a71..793b4d4 100644 --- a/home-modules/pkgs-list/programs.nix +++ b/home-modules/pkgs-list/programs.nix @@ -3,7 +3,6 @@ chromium element-desktop qbittorrent - unstable.spotify wl-clipboard xfce.thunar ] ++ (if (hyper.host != "NxACE") then [ diff --git a/home-modules/spotify.nix b/home-modules/spotify.nix index 09fb1ca..1ef4a6d 100644 --- a/home-modules/spotify.nix +++ b/home-modules/spotify.nix @@ -1,29 +1,56 @@ { pkgs, ... }@all: with all; { - home = { - programs.spotify-player = { - enable = true; - settings = { - theme = "default"; - # border_type = "Rounded"; - progress_bar_type = "Line"; - playback_window_position = "Bottom"; - play_icon = ""; - pause_icon = ""; - liked_icon = ""; - copy_command = { - command = "wl-copy"; - args = [ ]; - }; - # client_id = "65b708073fc0480ea92a077233ca87bd"; - client_port = 8888; - ap_port = 443; - device = { - audio_cache = true; - normalization = true; - volume = 50; - }; - }; + home.packages = with pkgs; [ + unstable.spotify + ]; + services.librespot = { + enable = true; + package = pkgs.unstable.librespot; + }; + sops.secrets."spotify/spotiy-player-clinet-id" = { path = "%r/secrets/spotify/spotiy-player-clinet-id"; }; + programs.spotify-player = { + enable = true; + package = pkgs.unstable.spotify-player; + settings = { + border_type = "Rounded"; + client_id_command = "cat $XDG_RUNTIME_DIR/secrets/spotify/spotiy-player-clinet-id"; + copy_command.command = "wl-copy"; + cover_img_length = 20; + cover_img_scale = 1; # if this is not 1 it doesnt fit in the box (for me) + cover_img_width = 9; # this ratio depends on your terminal font + device.normalization = true; + genre_num = 32; # all of them + liked_icon = ""; + name = "spotify-player-${hyper.host}"; + pause_icon = ""; + playback_window_position = "Bottom"; + play_icon = ""; + progress_bar_position = "Right"; # "Bottom" + progress_bar_type = "Rectangle"; # "Line" + theme = "${hyper.user}"; }; + themes = [{ + name = "${hyper.user}"; + component_style = with rice.color; { + block_title = { fg = accent.bright; }; + border = { fg = border; }; + current_playing = { fg = special.base; bg = special.darker; modifiers = ["Italic"]; }; + like = { fg = positive.base; }; + lyrics_played = { fg = subtle.base; }; + lyrics_playing = { fg = special.base; }; + page_desc = { fg = secondary.base; }; + playback_album = { fg = secondary.base; }; + playback_artists = { fg = secondary.base; }; + playback_genres = { fg = subtle.base; }; + playback_metadata = { fg = accent.base; bg = background; }; + playback_progress_bar = { fg = accent.brighter; bg = accent.dark; modifiers = ["Bold"]; }; + playback_status = { fg = accent.bright; }; + playback_track = { fg = accent.bright; modifiers = ["Bold"]; }; + secondary_row = { fg = secondary.base; }; + selection = { bg = accent.dark; }; + table_header = { fg = tertiary.bright; }; + # playback_progress_bar_unfilled (Specific to progress_bar_type as Line) = ""; + }; + }]; }; } diff --git a/home.nix b/home.nix index 194c3dc..f06d957 100644 --- a/home.nix +++ b/home.nix @@ -55,6 +55,7 @@ ./home-modules/scanning.nix ./home-modules/sent.nix ./home-modules/sops.nix + ./home-modules/spotify.nix ./home-modules/ssh.nix ./home-modules/starship.nix ./home-modules/tts.nix