mirror of
https://github.com/JakeStanger/ironbar.git
synced 2026-07-11 06:15:21 +01:00
[PR #1344] [MERGED] feat: Access ironbar variables from cairo/lua #5536
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#5536
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/1344
Author: @untoldwind
Created: 1/25/2026
Status: ✅ Merged
Merged: 1/26/2026
Merged by: @JakeStanger
Base:
master← Head:master📝 Commits (10+)
8530515Access ironbar variables from lua1cb697aAdd config_dir fieldb44e21aAdd log helpers68b76eaAdd high resolution unixtime19aa5fcAdd draw width/heigh parameters4ab37cfSplit var_get into var_get/var_list505e60dAdd documentationa4308e2Update docs/modules/Cairo.md1a6ccc1Refactor feature flag685f088Tweak doc📊 Changes
9 files changed (+170 additions, -29 deletions)
View changed files
📝
docs/modules/Cairo.md(+29 -11)📝
lua/draw.lua(+2 -2)📝
src/clients/lua.rs(+126 -3)📝
src/clients/mod.rs(+2 -2)📝
src/clients/sysinfo.rs(+2 -2)📝
src/clients/upower/mod.rs(+1 -1)📝
src/config/mod.rs(+1 -1)📝
src/main.rs(+3 -3)📝
src/modules/cairo.rs(+4 -4)📄 Description
Added the following functions/fields to lua:
ironbar:var_get(key): Lookup an ironbar variable, ifkeyis a namespace all variables in that namespace are returned as a lua-tableironbar:log_debug(msg),ironbar:log_info(msg), ...: Just some logging helpers (better than usingprintin lua.ironbar:unixtime(): Helper for high resolution unixtime. With this theday_msin the clock example can be done without running an executable:ironbar.config_dir: This makes it simpler to do relative file import viadofilein luaBackground for all of this:
I was trying to create a simple barchart for cpu load per core.
With the changes/additions this can be done with a rather simple script:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.