Skip to content

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