Add ncspot theme

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-06-08 13:40:50 +01:00
parent c5d0933648
commit 24ac4753eb
3 changed files with 49 additions and 21 deletions

View File

@@ -2,25 +2,30 @@
user ? throw "user argument is required",
home ? throw "home argument is required",
}:
{ ... }:
{ lib, pkgs, ... }:
{
environment.persistence = {
"/persist/state"."${home}/.config/ncspot/userstate.cbor" = { };
"/persist/cache"."${home}/.cache/ncspot" = { };
};
home-manager.users.${user}.programs.ncspot = {
enable = true;
settings = {
use_nerdfont = true;
volnorm = true;
default_keybindings = true;
library_tabs = [
"albums"
"artists"
"playlists"
"browse"
];
home-manager.users.${user} = {
programs.ncspot.enable = true;
theme = {
template.".config/ncspot/config.toml".source = ./theme.toml;
reloadExtraConfig = "${
lib.meta.getExe (
pkgs.writeShellApplication {
name = "reload-ncspot";
runtimeInputs = with pkgs; [ netcat ];
text = ''
printf "reload\n" | nc -W 1 -U "''${XDG_RUNTIME_DIR:-/run/user/$UID}/ncspot/ncspot.sock"
'';
}
)
} &";
};
};
}

View File

@@ -0,0 +1,23 @@
use_nerdfont = true
volnorm = true
default_keybindings = true
library_tabs = [ "albums", "artists", "playlists", "browse" ]
[theme]
background = "{{colors.surface.default.hex}}"
primary = "{{colors.on_surface.default.hex}}"
secondary = "{{colors.surface.default.hex}}"
title = "{{colors.primary.default.hex}}"
playing = "{{colors.primary.default.hex}}"
playing_bg = "{{colors.surface.default.hex}}"
highlight = "{{colors.on_primary.default.hex}}"
highlight_bg = "{{colors.primary.default.hex}}"
playing_selected = "{{colors.on_primary.default.hex}}"
error = "{{colors.on_error.default.hex}}"
error_bg = "{{colors.error.default.hex}}"
statusbar = "{{colors.primary.default.hex}}"
statusbar_progress = "{{colors.primary.default.hex}}"
statusbar_bg = "{{colors.surface.default.hex}}"
cmdline = "{{colors.on_surface.default.hex}}"
cmdline_bg = "{{colors.surface.default.hex}}"
search_match = "{{colors.tertiary.default.hex}}"