[PR #19] [MERGED] Major module refactor #453

Closed
opened 2026-05-22 21:53:34 +01:00 by JakeStanger · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/JakeStanger/ironbar/pull/19
Author: @JakeStanger
Created: 9/25/2022
Status: Merged
Merged: 9/25/2022
Merged by: @JakeStanger

Base: masterHead: refactor/controller


📝 Commits (3)

  • 8deca0c experiment with refactoring into MVC-like model
  • 47c220a Merge branch 'master' into refactor/controller
  • 801b81a refactor: major module restructuring

📊 Changes

26 files changed (+2353 additions, -1818 deletions)

View changed files

📝 Cargo.lock (+235 -264)
📝 Cargo.toml (+6 -6)
📝 src/bar.rs (+133 -42)
src/bridge_channel.rs (+43 -0)
📝 src/collection.rs (+15 -0)
📝 src/main.rs (+33 -20)
src/modules/clock.rs (+114 -0)
src/modules/clock/mod.rs (+0 -71)
src/modules/clock/popup.rs (+0 -40)
📝 src/modules/focused.rs (+80 -44)
📝 src/modules/launcher/item.rs (+244 -237)
📝 src/modules/launcher/mod.rs (+474 -262)
📝 src/modules/launcher/open_state.rs (+5 -13)
src/modules/launcher/popup.rs (+0 -36)
📝 src/modules/mod.rs (+57 -5)
📝 src/modules/mpd/client.rs (+90 -19)
📝 src/modules/mpd/mod.rs (+308 -117)
src/modules/mpd/popup.rs (+0 -175)
📝 src/modules/script.rs (+53 -31)
📝 src/modules/sysinfo.rs (+47 -21)

...and 6 more files

📄 Description

Modules now implement a "controller", which allows for separation of logic from UI code and enforces a tighter structure around how modules should be written. The introduction of this change required major refactoring or even rewriting of all modules.

This also better integrates the popup into modules, making it easier for data to be passed around without fetching the same thing twice

The refactor also improves some client code, switching from ksway to the much more stable swayipc-async. Partial multi-monitor for the tray module has been added.

BREAKING CHANGE: The mpd module config has changed, moving the icons to their own object.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/JakeStanger/ironbar/pull/19 **Author:** [@JakeStanger](https://github.com/JakeStanger) **Created:** 9/25/2022 **Status:** ✅ Merged **Merged:** 9/25/2022 **Merged by:** [@JakeStanger](https://github.com/JakeStanger) **Base:** `master` ← **Head:** `refactor/controller` --- ### 📝 Commits (3) - [`8deca0c`](https://github.com/JakeStanger/ironbar/commit/8deca0cd12664c4591b16f84a7c027a4006693ff) experiment with refactoring into MVC-like model - [`47c220a`](https://github.com/JakeStanger/ironbar/commit/47c220ab0e47b55ed6354652203d253b83e6e01f) Merge branch 'master' into refactor/controller - [`801b81a`](https://github.com/JakeStanger/ironbar/commit/801b81a604efdddc3ac69f3c13c6cf7cd7474b39) refactor: major module restructuring ### 📊 Changes **26 files changed** (+2353 additions, -1818 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+235 -264) 📝 `Cargo.toml` (+6 -6) 📝 `src/bar.rs` (+133 -42) ➕ `src/bridge_channel.rs` (+43 -0) 📝 `src/collection.rs` (+15 -0) 📝 `src/main.rs` (+33 -20) ➕ `src/modules/clock.rs` (+114 -0) ➖ `src/modules/clock/mod.rs` (+0 -71) ➖ `src/modules/clock/popup.rs` (+0 -40) 📝 `src/modules/focused.rs` (+80 -44) 📝 `src/modules/launcher/item.rs` (+244 -237) 📝 `src/modules/launcher/mod.rs` (+474 -262) 📝 `src/modules/launcher/open_state.rs` (+5 -13) ➖ `src/modules/launcher/popup.rs` (+0 -36) 📝 `src/modules/mod.rs` (+57 -5) 📝 `src/modules/mpd/client.rs` (+90 -19) 📝 `src/modules/mpd/mod.rs` (+308 -117) ➖ `src/modules/mpd/popup.rs` (+0 -175) 📝 `src/modules/script.rs` (+53 -31) 📝 `src/modules/sysinfo.rs` (+47 -21) _...and 6 more files_ </details> ### 📄 Description Modules now implement a "controller", which allows for separation of logic from UI code and enforces a tighter structure around how modules should be written. The introduction of this change required major refactoring or even rewriting of all modules. This also better integrates the popup into modules, making it easier for data to be passed around without fetching the same thing twice The refactor also improves some client code, switching from `ksway` to the much more stable `swayipc-async`. Partial multi-monitor for the tray module has been added. BREAKING CHANGE: The `mpd` module config has changed, moving the icons to their own object. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
JakeStanger 2026-05-22 21:53:34 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/ironbar#453
No description provided.