Background:
I like the look of the native Now Playing widgets, I like how you can place things on different lines and with varying font sizes etc.. However, I use chrome and so I have to use my own Now Playing widget for things like youtube.
Now, I would like to mimic the look of the native Now Playing widget with my custom chrome widget. I can almost get there with just apple script but it would be a lot better if I could use JSON controls to change the font size of items.
How would I go about using JSON to mimic the native Now Playing Widget? Possible to mix applescript and JSON in a return?
This is basically what I do now: return trackInfo & return & "(" & duration & ")" & " — " & album
Not easily as far as I know. Maybe @Andreas_Hegenberg can add support for primary and secondary labels in widgets.
The only workaround I can think of is to render the entire widget (album art, labels) yourself to a bitmap and pass that as a base64 encoded string. It’d be fairly straightforward by writing a custom CLI utility that uses CoreGraphics, but if you’re using AppleScript then you’re kinda out of luck.
Where I basically have the icon occupying the full height of the TB and the text information on 2 separate lines. Its pretty much like how the Now Playing widget acts with the cover art and album info. But this would be for the weather and the icon is just a string (emoji). Possible?
I'm not using the native weather widget, just my own for right now but would it be possible in either case?
Yes, just add a \n to your output.
I'll soon expose the "detail" text line, so users will be able to use a small detail text line like in the "Now Playing" widget.
I'm happy to help you out, I'm not a dev either and have been just picking things up as I go. Are you just interested in the iTunes now playing widget?
Have your tried adding a native now playing widget? its about 99% the same thing as mine would be a bit easier to use and customize too