mirror of
https://github.com/JakeStanger/ironbar.git
synced 2026-07-11 09:15:22 +01:00
[GH-ISSUE #94] Allow scripts in src image prop / script output not captured #52
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#52
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?
Originally created by @yavko on GitHub (Apr 1, 2023).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/94
Is your feature request related to a problem? Please describe.
I want to display cover image of current song in bar
Describe the solution you'd like
Allow scripts in src
Describe alternatives you've considered
I would still like scripts to be allowed to be used in src, but cover in bar could also be added to the music widget.
Additional context
@JakeStanger commented on GitHub (Apr 1, 2023):
Makes sense, don't think this will be too hard to do.
@yavko commented on GitHub (Apr 10, 2023):
yay
@yavko commented on GitHub (Apr 12, 2023):
Doesn't work on latest commit

config:
doesn't matter what combination of
/s I use, it just won't work@JakeStanger commented on GitHub (Apr 12, 2023):
That's odd, looks like the script output isn't getting captured. Also those slashes are horrible 🙃
If you try just a
labelelement with the same script, can you get the URL to display as text? Also, can you double check it's writing to stdout (idk why it wouldn't)?@yavko commented on GitHub (Apr 13, 2023):
WAIT! That explains it, since i'm not able to get the uptime script thing you have in the power thing to work either
I agree, I was trying everything, this just happened to be the last thing I tried lmao
YEAH IT DOESN'T

stdout works, unless this isn't stdout?
Ig this can re-closed, and a diff issue could be used, since it seems that no script is running.
@yavko commented on GitHub (Apr 13, 2023):
Works in my repl, idk why it aint working

Though I know ironbar also uses pipes and listens for updates over channels, its probably a ironbar issue.
@JakeStanger commented on GitHub (Apr 13, 2023):
Standard pipe will be stdout, so that rules that out.
I'm happy to keep it here since we've got the context here. Have updated the issue to reflect that.
Ironbar runs commands by spawning a
sh -c '<your script here>'.Could it be a nixos quirk causing some kind of env issue with that?Clearly not based on the REPL, scrap that. Scripts definitely do work for me on Arch on latest commit though.@JakeStanger commented on GitHub (Apr 13, 2023):
I've just pushed up a commit into master that adds some additional logging to the script module. Could you try running a minimal config (ie just custom module with a single label with a script in it) using
IRONBAR_LOG=trace(orIRONBAR_FILE_LOG=trace) and send the log pls? (It'll probably be very long)@yavko commented on GitHub (Apr 16, 2023):
with a minimal example it works?!??!
@yavko commented on GitHub (Apr 16, 2023):
This is weird maybe when one command fails, it brings down all the other commands? But why would some commands fail, they are all valid?
@JakeStanger commented on GitHub (Apr 16, 2023):
Oh very interesting, I've no idea why that would happen, unless you're triggering some kind of hrottling (why would dbus or a unix socket do that?) or there's some wires getting crossed in Ironbar.
Are you able to share your full config file (preferably in the compiled JSON format rather than Nix) and I can try and replicate exactly what's happening?
@yavko commented on GitHub (Apr 16, 2023):
Here:
@JakeStanger commented on GitHub (Apr 20, 2023):
So! I think I've found the bug and it's in the script input parser - because the playerctl command contains a colon, it's hitting that and only taking everything after as the command. I don't think that'll be too hard to fix.
@yavko commented on GitHub (Apr 20, 2023):
Ohhh, that would make sense
@JakeStanger commented on GitHub (Apr 20, 2023):
The linked PR works for me at least with your config - are you able to give it a shot when you get a few mins and confirm please?
@yavko commented on GitHub (Apr 20, 2023):
Sure, I'm at school rn so I'll do it in like 2 hours
@yavko commented on GitHub (Apr 21, 2023):
Sorry something came up, but it does work! It fixed it!!
@JakeStanger commented on GitHub (Apr 21, 2023):
No worries at all, work and sleep keep me busy most the day so it's never a rush. Thanks for testing, I'll merge the PR now.