Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

colored text and an updatable icon? #428

Open
jmcmains opened this issue Dec 24, 2021 · 2 comments
Open

colored text and an updatable icon? #428

jmcmains opened this issue Dec 24, 2021 · 2 comments

Comments

@jmcmains
Copy link

I'm creating a personalized version of the pomodoro button, and I originally set it up to change color based on the remaining time. But I'd also like to include an icon that displays the count of Pomodoro cycles, so basically a combination of the output of a shell script and an apple script. so I'm sort of asking a 2 part question:
can I either:
a) display a dynamic icon in shell script buttons?
b) dynamically change text color in an apple script button?
example

Thanks for any help!

@jmcmains
Copy link
Author

Looking over the code, it seems like my issue might be properly formatting the output of the shell script:
image
I'm currently attempting to output json as a string, but it seems to throw an error:
Expected to decode Dictionary<String, Any> but found a string/data instead.

here is the json string that my shell script outputs:

{"title":"25:00","image":"~/Library/Application Support/MTMR/pomodoro/t1.png"}

@jmcmains
Copy link
Author

I was able to get a little further on this by figuring out that the issue was that I wasn't sending the image element correctly, but, ultimately i realized I could just do this with two separate buttons. It feels sort of hacky, but it solves my problem for now. Would still be nice to know if there is a proper way to output a shell script to display an icon though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant