Skip to content

feat(theme): add sway bar color integration - #2154

Open
him-cyber wants to merge 2 commits into
greshake:masterfrom
him-cyber:sway-theme-override
Open

feat(theme): add sway bar color integration#2154
him-cyber wants to merge 2 commits into
greshake:masterfrom
him-cyber:sway-theme-override

Conversation

@him-cyber

@him-cyber him-cyber commented Apr 3, 2025

Copy link
Copy Markdown

Summary

This PR introduces optional integration with the user's Sway configuration to automatically apply bar colors (background and foreground) from the ~/.config/sway/config file. Fix for the open issue #2145

Motivation

As a Wayland-native window manager, Sway allows defining custom bar colors. This enhancement bridges the theme configuration in i3status-rust with Sway’s color settings, improving visual consistency and user experience for Sway users.

Implementation

  • Introduced a sway_integration section in config.toml
  • Parsed Sway bar colors (background, statusline) from the local Sway config
  • Applied parsed colors to the theme's idle_bg and idle_fg fields
  • Added necessary Rust glue code with minimal footprint

Config Usage

To enable this, add to your config.toml:

[sway_integration]
use_sway_bar_colors = true

@bim9262

This comment was marked as resolved.

@bim9262
bim9262 force-pushed the sway-theme-override branch from 12c891c to c398786 Compare August 1, 2026 19:28
@bim9262

bim9262 commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

@him-cyber I updated the PR to make sure that we actually check if use_sway_bar_colors is true as well as updating the logic to find the colors for the specific bar that's running using swayipc.

@bim9262

bim9262 commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

What are your thoughts on pulling in the separator color from the config to override separator_fg too?

@bim9262
bim9262 force-pushed the sway-theme-override branch from c398786 to 01b2d96 Compare August 11, 2026 23:28
@bim9262
bim9262 force-pushed the sway-theme-override branch from 01b2d96 to e6421d5 Compare August 11, 2026 23:30
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.

2 participants