Skip to content

feishin: init - #2426

Open
make-42 wants to merge 1 commit into
nix-community:masterfrom
make-42:add-feishin-theme
Open

feishin: init#2426
make-42 wants to merge 1 commit into
nix-community:masterfrom
make-42:add-feishin-theme

Conversation

@make-42

@make-42 make-42 commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Adds support for Feishin (music player). It drops theme files into a specific dir. Users can then load the theme files themselves from the application

image

@stylix-automation stylix-automation Bot added topic: home-manager Home Manager target topic: testbed Testbed changes topic: modules /modules/ subsystem labels Jul 26, 2026
@make-42

make-42 commented Jul 26, 2026

Copy link
Copy Markdown
Contributor Author

also, the nixpkgs version shipped with the repo is too old to test with the testbeds without pinning it to a newer version because I added support for theming from files in the latest release of Feishin only.

@make-42
make-42 force-pushed the add-feishin-theme branch from 398d23d to 52a0d78 Compare July 26, 2026 21:15
Comment thread modules/feishin/hm.nix
Comment on lines +98 to +102
value.text = themeJson;
}
{
name = "${dir}/Themes/stylix.css";
value.text = themeCss;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to inline themeCss and themeJson

Comment thread modules/feishin/hm.nix
mode = if polarity == "light" then "light" else "dark";

themeJson = builtins.toJSON {
extends = if mode == "light" then "ayuLight" else "tokyoNight";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems like a really weird way to handle this, but I guess we have to work with what upstream gives us.

Comment thread modules/feishin/hm.nix
inherit mode;

colors = {
background = withHashtag.base00;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using with colors.withHashtag here would be prefered

Comment thread modules/feishin/hm.nix
Comment on lines +3 to +4
options = {
dev.enable = lib.mkEnableOption "installing the theme for the Feishin development build (`~/.config/feishin-dev`) in addition to the stable build";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
options = {
dev.enable = lib.mkEnableOption "installing the theme for the Feishin development build (`~/.config/feishin-dev`) in addition to the stable build";
options.dev.enable = lib.mkEnableOption "installing the theme for the Feishin development build (`~/.config/feishin-dev`) in addition to the stable build";

Comment thread modules/feishin/hm.nix
Comment on lines +3 to +4
options = {
dev.enable = lib.mkEnableOption "installing the theme for the Feishin development build (`~/.config/feishin-dev`) in addition to the stable build";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why should this not be enabled by default?

Comment thread modules/feishin/hm.nix
mode = if polarity == "light" then "light" else "dark";

themeJson = builtins.toJSON {
extends = if mode == "light" then "ayuLight" else "tokyoNight";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this use builtin themes as baseline that may be incompatible with the Stylix theme? Why not declare the entire theme in colors or use a workaround like in #2398 (comment)?

Comment thread modules/feishin/hm.nix
mode = if polarity == "light" then "light" else "dark";

themeJson = builtins.toJSON {
extends = if mode == "light" then "ayuLight" else "tokyoNight";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the following to align with #2347:

Suggested change
extends = if mode == "light" then "ayuLight" else "tokyoNight";
extends = if mode == "dark" then "tokyoNight" else "ayuLight";

Comment thread modules/feishin/hm.nix
let
inherit (colors) withHashtag;

mode = if polarity == "light" then "light" else "dark";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the following to align with #2347:

Suggested change
mode = if polarity == "light" then "light" else "dark";
mode = if polarity == "dark" then "dark" else "light";

Comment thread modules/feishin/hm.nix
{
colors,
cfg,
polarity,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should move into its own { polarity } config.

Comment thread modules/feishin/hm.nix
Comment on lines +9 to +10
colors,
cfg,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following is currently more common in Stylix:

Suggested change
colors,
cfg,
cfg,
colors,

Comment thread modules/feishin/hm.nix
};

app = {
overlay-header = "linear-gradient(transparent 0%, ${withHashtag.base00}D9 100%), var(--theme-background-noise)";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this transparency relate to the opacity option?

Comment thread modules/feishin/hm.nix
Comment on lines +42 to +45
overlay-header = "linear-gradient(transparent 0%, ${withHashtag.base00}D9 100%), var(--theme-background-noise)";
overlay-subheader = "linear-gradient(180deg, ${withHashtag.base00}0D 0%, var(--theme-colors-background) 100%), var(--theme-background-noise)";
scrollbar-handle-background = "${withHashtag.base0D}33";
scrollbar-handle-hover-background = "${withHashtag.base0D}66";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the D9, 0D, 33, and 66 magic numbers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: home-manager Home Manager target topic: modules /modules/ subsystem topic: testbed Testbed changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants