Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

him-cyber
Copy link

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

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

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.

1 participant