mirror of
https://github.com/JakeStanger/ironbar.git
synced 2026-07-11 06:15:21 +01:00
[PR #671] [MERGED] Feat: sway-mode module #7886
Labels
No labels
A:Build
A:CI
A:Client
A:Config
A:Core
A:Documentation
A:Documentation
A:IPC
A:Testing
A:UX/UI
blocked
BREAKING CHANGE
duplicate
good first issue
GTK4
help wanted
invalid
M:Battery
M:Battery
M:Bindmode
M:Bluetooth
M:Brightness
M:Cairo
M:Clipboard
M:Clock
M:Clock
M:Custom
M:Focused
M:Keyboard
M:Launcher
M:Menu
M:Music
M:Music
M:Music
M:Network Manager
M:Notifications
M:SysInfo
M:Tray
M:Volume
M:Workspaces
partially resolved
P:Critical
P:High
P:Low
P:Medium
pull-request
T:Bug
T:Bug
T:Core Enhancement
T:Module Enhancement
T:New Module
T:Question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
JakeStanger/ironbar#7886
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/JakeStanger/ironbar/pull/671
Author: @Rodrigodd
Created: 7/20/2024
Status: ✅ Merged
Merged: 8/5/2024
Merged by: @JakeStanger
Base:
master← Head:feat/sway-mode-module📝 Commits (9)
fa0175ffeat: add sway-mode module6effd8crefactor: Avoid making multiple connections to SwayIPCec98e69fix(sway-mode): better documentation and fix Styling sectionc355c3bfix(sway-mode): avoid unwrapd0a4a91refactor: usetry_send!(tx, ...)instead ofawait_sync(tx.send(...))9c30bc4refactor: makeadd_listenerreceive event by Type853c5d7refactor: movesway::Clientout of compositor38414ecdocs: add sway-mode to _Sidebar.mdebe656drefactor(sway-mode): replace unwrap by expect📊 Changes
11 files changed (+411 additions, -72 deletions)
View changed files
📝
Cargo.toml(+3 -1)📝
docs/_Sidebar.md(+1 -0)➕
docs/modules/Sway-mode.md(+78 -0)📝
src/clients/compositor/mod.rs(+7 -4)📝
src/clients/compositor/sway.rs(+24 -66)📝
src/clients/mod.rs(+20 -1)➕
src/clients/sway.rs(+181 -0)📝
src/config/mod.rs(+6 -0)📝
src/modules/mod.rs(+2 -0)➕
src/modules/sway/mod.rs(+1 -0)➕
src/modules/sway/mode.rs(+88 -0)📄 Description
Add a new module, similar to the waybar "sway/module" module. It shows the current mode under sway. For that, it needs to communicate with the Sway IPC. In this PR, the module is called "sway-mode" because "sway/mode" didn't work in my YAML config file (it would probably work if I surrounded it with quotes, but I didn't test).
This PR has two commits: the first one implements the module using a new sway connection. The second one refactors the sway
Client, underclients::compositor::sway, to allow dynamically registering events, instead of only handling Workspace update ones. This second commit avoid creating a new socket for each module that needs to communicate with the Sway IPC, not sure if that is a problem to begin with.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.