Skip to content

Follow Omarchy colors and fonts on Linux - #273

Closed
derluke wants to merge 1 commit into
crmne:mainfrom
derluke:omarchy-integration
Closed

derluke wants to merge 1 commit into
crmne:mainfrom
derluke:omarchy-integration

Conversation

@derluke

@derluke derluke commented Sep 3, 2026

Copy link
Copy Markdown

Visible changes

  • Adds an opt-in Omarchy appearance choice on Linux. The main window follows the desktop palette and selected interface font, including changes made while Fastpotify is open.
  • The built-in Winamp skin follows the app palette, including Light mode. Its playlist, equalizer, and visualizer use the same colors. User-installed .wsz skins remain unchanged.
  • No controls or panels are moved. Dark, Light, and Follow system retain their existing main-window appearance.

Why

Fastpotify can match an Omarchy desktop without maintaining a separate app theme or installing a theme-change hook.

This overlaps with the desktop-theming use case in #171. That PR proposes general custom schemes; this one reads Omarchy's existing palette and font selection directly.

What changed

  • Read the active palette and selected Fontconfig family, with a background reader for live updates.
  • Support current and legacy palettes, plus safe fallbacks for missing or invalid input.
  • Keep bundled fonts as fallbacks and isolate Omarchy integration to Linux.
  • Add regression tests and document the new setting and file access. No new dependencies, network access, or changes to Omarchy configuration.

Verification

Tested on Linux. Both test configurations pass 305 library tests and 3 executable tests. Windows and macOS were not tested locally.

cargo fmt --all --check
cargo clippy --locked --all-targets -- -D warnings
cargo clippy --locked --all-targets --all-features -- -D warnings
cargo test --locked --all-targets
cargo test --locked --all-targets --all-features
cargo test --locked --all-features --doc
RUSTDOCFLAGS='-D warnings' cargo doc --locked --all-features --no-deps
(cd docs && bundle exec jekyll build)

All images below use the repository's demo fixtures, not a real account. The captures contain no textual or EXIF metadata and are hosted on a separate review-assets branch, outside this source diff.

Main window: before and after, dark and light
Upstream Omarchy
Dark, bundled font Tokyo Night, JetBrainsMono Nerd Font
Before: Dark After: Tokyo Night
Light, bundled font Flexoki Light, Liberation Mono
Before: Light After: Flexoki Light
Mini-player: original skin, Tokyo Night, and Flexoki Light
Original Tokyo Night Flexoki Light
Original mini-player Tokyo Night mini-player Flexoki Light mini-player

@crmne

crmne commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Thanks for the thoughtful implementation and the screenshots. I like this direction, and I am reopening the PR.

It should fit into a broader theming model rather than make Omarchy configuration the Fastpotify theme API. The cleanest shape may be a generic Fastpotify theme file that Omarchy writes. Please hold off on reshaping the implementation until we settle which side should own that integration.

@crmne crmne closed this Sep 3, 2026
@crmne crmne reopened this Sep 3, 2026
@crmne
crmne requested a lite review from Copilot September 4, 2026 14:50

Copilot AI left a comment

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.

🟡 Changes recommended

The PR introduces user-facing help/error strings that can be misleading or inaccurate in real failure modes, and these should be corrected before approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

User-visible UI impact: Adds an opt-in Omarchy theme choice on Linux that follows Omarchy’s resolved desktop palette and selected interface font (including live updates). The built-in Winamp skin is recoloured to match the active app palette in non-default palettes.

Changes:

  • Adds an Omarchy ThemeChoice, wires it through settings UI, serialization, and runtime theme selection.
  • Introduces Linux-only Omarchy integration: palette parsing, font resolution via Fontconfig, and a polling watcher for live updates.
  • Recolours the built-in Winamp skin to the active Palette (while keeping user-provided .wsz skins unchanged), plus regression tests and docs updates.
File summaries
File Description
src/ui/settings.rs Conditionally shows the Omarchy theme option and adds explanatory text in the Appearance section.
src/theme.rs Adds interface-font plumbing and support for installing/applying an Omarchy-provided font.
src/skin/mod.rs Implements palette-aware recolouring for the built-in Winamp skin and adds tests for recolouring behavior.
src/settings.rs Adds ThemeChoice::Omarchy, updates labels/ALL list, and adds a serialization round-trip test.
src/omarchy.rs New Linux Omarchy integration: palette parsing, font resolving, and a polling watcher with tests.
src/omarchy_stub.rs New non-Linux stubs for the Omarchy module APIs.
src/lib.rs Adds platform-gated omarchy module wiring (real vs stub).
src/app.rs Applies Omarchy palette/font at runtime, refreshes built-in skin on palette changes, and adds regression tests.
README.md Documents Omarchy theme support and built-in skin palette-following behavior.
docs/_reference/settings-and-files.md Documents theme=omarchy and the Omarchy file paths/behavior.
docs/_guide/winamp.md Documents built-in skin palette-following and preserved classic skins.
docs/_guide/what-is-fastpotify.md Updates high-level feature description to include Omarchy theme support on Linux.
Review details

Suppressed comments (1)

src/omarchy.rs:51

  • Same as load_palette(): if BaseDirs cannot be created, this error currently claims Omarchy fonts are unavailable on Linux, which is misleading. Use a home-directory resolution error instead so users understand what failed.
    let path =
        fontconfig_path().ok_or_else(|| "Omarchy fonts are only available on Linux".to_string())?;
    let source = std::fs::read_to_string(&path)
  • Files reviewed: 12/12 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/theme.rs
Comment on lines +296 to +301
let omarchy_face = |face: &FontFace, weight: f32| {
let mut data = FontData::from_owned(face.bytes.to_vec());
data.index = face.index;
data.tweak.coords = VariationCoords::new([(b"wght", weight)]);
Arc::new(data)
};
Comment thread src/omarchy.rs
Comment on lines +39 to +41
let path =
theme_path().ok_or_else(|| "Omarchy themes are only available on Linux".to_string())?;
let source = std::fs::read_to_string(&path)
Comment thread src/ui/settings.rs
Comment on lines +456 to +460
if omarchy_theme_visible {
"Omarchy follows the active desktop palette."
} else {
""
},
@dim-ghub

dim-ghub commented Sep 5, 2026

Copy link
Copy Markdown

Im a bit confused as to why this was reopened if the goal is still to have generic theming and not direct compatibility with one specific system, as this PR seems to introduce the latter.

@crmne

crmne commented Sep 6, 2026

Copy link
Copy Markdown
Owner

It was reopened to keep the theming discussion open. The integration approach is still undecided, and this implementation is not approved for merging. Please hold off on further changes until I settle that.

@dim-ghub

dim-ghub commented Sep 6, 2026

Copy link
Copy Markdown

It was reopened to keep the theming discussion open. The integration approach is still undecided, and this implementation is not approved for merging. Please hold off on further changes until I settle that.

Wouldn't it make more sense to move to an issue?

@crmne

crmne commented Sep 6, 2026

Copy link
Copy Markdown
Owner

The theming decision is now made: Fastpotify will own a generic JSON palette format, starting with #392, and Omarchy integration can produce that format separately. I’m closing this direct colors/fonts integration so we have one implementation path. Thank you for the work and screenshots; the palette conversion work may still be useful on the Omarchy side.

@crmne crmne closed this Sep 12, 2026
@derluke

derluke commented Sep 15, 2026

Copy link
Copy Markdown
Author

I see you added the theming support now. Awesome 😎

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants