mirror of
https://github.com/JakeStanger/ironbar.git
synced 2026-07-11 05:15:23 +01:00
[PR #1348] [MERGED] feat: Load cairo/lua like a lua-module #6942
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#6942
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/1348
Author: @untoldwind
Created: 1/27/2026
Status: ✅ Merged
Merged: 1/29/2026
Merged by: @JakeStanger
Base:
master← Head:improve_load📝 Commits (9)
03841a4exp: Load cairo/lua like a lua-modulef454b92Cleanup + adjust documentation1c1e301Fix typosc488c47Add a custom cairo examplebac5bedUpdate src/modules/cairo.rs98ea5ceFix importsaeaf5c7Drop id from widget context4a4cb12Drop mutexddad186Fix inline image in doc📊 Changes
5 files changed (+267 additions, -54 deletions)
View changed files
➕
docs/examples/custom/Cpu-Cores-Graph.md(+164 -0)📝
docs/modules/Cairo.md(+39 -11)📝
lua/draw.lua(+2 -2)📝
src/modules/cairo.rs(+62 -39)📝
src/modules/mod.rs(+0 -2)📄 Description
This is more a suggestion/possible solution for the somewhat hacky
script.replace("function draw" ....Instead of having a draw function in the global scope the script is expected to return the drawing function itself.
This allows a greater flexibility in writing scripts without "polluting" the global scope:
As a bonus it is also no longer necessary to patch the error message to get the correct file reference.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.