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

Static button with base64 encoded image not work #98

Closed
trntv opened this issue Jun 9, 2018 · 8 comments
Closed

Static button with base64 encoded image not work #98

trntv opened this issue Jun 9, 2018 · 8 comments
Labels
bug Something isn't working

Comments

@trntv
Copy link

trntv commented Jun 9, 2018

This will not work, although image renders correctly:

{
  "type": "staticButton",
  "action": "shellScript",
  "executablePath": "/usr/local/bin/maclock",
  "width": 36,
  "align": "left",
  "image": {
    "base64":
      "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAAiEAAAIhAENVwL6AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAQtQTFRF////gICA////VVVV////1dXVVWqA1dXVUmZ6xMzEWGh4ycnJUmt6U2x7Ump4Uml71t/bVGp72traVGp5U2x4yMrIU2l4VGl6xsrGVGp6VGp5U2t5U2l529/fyMvIusC/VGp5xsnGxsnGu8HAVGp5VWl5VGp53ODgx8rHVGt5mKSnx8rHVWl509nZ3+PjxsrGU2p54OTkVGp53+PjVGp51Nrbx8rHVGp5sLu/yMrI4eXmx8rH4ubnVGp54+npVGp5VGp55err5errTExPVGp5X19hX2BiYGFjZGRnZGVoZmZpfH1+gYKDhIWGiIqMj5GTk5WXlJaWp6qsu767wsXCx8rH2Nze4ebn5+ztsVhOVQAAAEN0Uk5TAAICAwQGDAwZHiAhMjQ1ODg6PlJTYWhtfoCLjZadoaOkq7C1t7i5vsDJyc3Q3Nzd4uPm5+jp6u/v7+/w9ff6/P39/otxtB4AAAEASURBVDhPpdDnTgJBFAXgRYqAFCmCNEFUEERERJbe7hE7RVB4/ycxkCEzu7BjIufXnJwvuckoCo8pGM1UKplo0KTsjCsHlpxr1x7pAeWrWOyyDPQi23sAUMPm1cscVoGAfneqKNk3xV6C6tSBONpu3txtxHWggJRYUyhod1sXIbGH0LVpgAfwid0HeDTAC3hlfW9wcJLM5y/S6zys81ir3SYsm916/c2z5GkcMnAq7CJYZhm4MQItBupGYMBAk8+zj/GPFLwTjaRgSPQqBU9EL/uBZ6I3KfgkmkjBfPq1kII/P+qf4M4IdBg4MwJFBhziDfHCMQPK0Xl1G/Tv/avtFzQPtEKn9N7CAAAAAElFTkSuQmCC"
  }
},

this works but not render image

{
    "type": "staticButton",
    "action": "shellScript",
    "executablePath": "/usr/local/bin/maclock",
    "width": 36,
    "align": "left",
    "title": "🔒"
  },

this works fine

{
    "type": "staticButton",
    "action": "shellScript",
    "executablePath": "/usr/local/bin/maclock",
    "width": 36,
    "align": "left",
    "title": "sleep"
  },
@ad
Copy link
Collaborator

ad commented Jun 10, 2018

Try to add title attribute to first example

{
  "type": "staticButton",
  "title": "some title",
  "action": "shellScript",
  "executablePath": "/usr/local/bin/maclock",
  "width": 36,
  "align": "left",
  "image": {
    "base64":
      "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAAiEAAAIhAENVwL6AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAQtQTFRF////gICA////VVVV////1dXVVWqA1dXVUmZ6xMzEWGh4ycnJUmt6U2x7Ump4Uml71t/bVGp72traVGp5U2x4yMrIU2l4VGl6xsrGVGp6VGp5U2t5U2l529/fyMvIusC/VGp5xsnGxsnGu8HAVGp5VWl5VGp53ODgx8rHVGt5mKSnx8rHVWl509nZ3+PjxsrGU2p54OTkVGp53+PjVGp51Nrbx8rHVGp5sLu/yMrI4eXmx8rH4ubnVGp54+npVGp5VGp55err5errTExPVGp5X19hX2BiYGFjZGRnZGVoZmZpfH1+gYKDhIWGiIqMj5GTk5WXlJaWp6qsu767wsXCx8rH2Nze4ebn5+ztsVhOVQAAAEN0Uk5TAAICAwQGDAwZHiAhMjQ1ODg6PlJTYWhtfoCLjZadoaOkq7C1t7i5vsDJyc3Q3Nzd4uPm5+jp6u/v7+/w9ff6/P39/otxtB4AAAEASURBVDhPpdDnTgJBFAXgRYqAFCmCNEFUEERERJbe7hE7RVB4/ycxkCEzu7BjIufXnJwvuckoCo8pGM1UKplo0KTsjCsHlpxr1x7pAeWrWOyyDPQi23sAUMPm1cscVoGAfneqKNk3xV6C6tSBONpu3txtxHWggJRYUyhod1sXIbGH0LVpgAfwid0HeDTAC3hlfW9wcJLM5y/S6zys81ir3SYsm916/c2z5GkcMnAq7CJYZhm4MQItBupGYMBAk8+zj/GPFLwTjaRgSPQqBU9EL/uBZ6I3KfgkmkjBfPq1kII/P+qf4M4IdBg4MwJFBhziDfHCMQPK0Xl1G/Tv/avtFzQPtEKn9N7CAAAAAElFTkSuQmCC"
  }
},

@trntv
Copy link
Author

trntv commented Jun 11, 2018

Try to add title attribute to first example

i've already tried - image renders but button don't work

@Toxblh
Copy link
Owner

Toxblh commented Jun 11, 2018

Question: /usr/local/bin/maclock can you execute the command in terminal?

@trntv
Copy link
Author

trntv commented Jun 11, 2018

yes i can, works fine. button without image works as expected too

@Toxblh
Copy link
Owner

Toxblh commented Jun 11, 2018

@trntv this is strange, will fix it. So can you add "title": "any"

@Toxblh Toxblh added the bug Something isn't working label Jun 11, 2018
@kgunnit
Copy link

kgunnit commented Jun 13, 2018

Ran into the same issue, got it to work with the image if adding "title" after the image:

{
    "type": "staticButton",
    "align": "right",
    "action": "shellScript",
    "executablePath": "/usr/local/bin/maclock",
    "width": 40,
    "image": {
      "base64":
 "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAAiEAAAIhAENVwL6AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAQtQTFRF////gICA////VVVV////1dXVVWqA1dXVUmZ6xMzEWGh4ycnJUmt6U2x7Ump4Uml71t/bVGp72traVGp5U2x4yMrIU2l4VGl6xsrGVGp6VGp5U2t5U2l529/fyMvIusC/VGp5xsnGxsnGu8HAVGp5VWl5VGp53ODgx8rHVGt5mKSnx8rHVWl509nZ3+PjxsrGU2p54OTkVGp53+PjVGp51Nrbx8rHVGp5sLu/yMrI4eXmx8rH4ubnVGp54+npVGp5VGp55err5errTExPVGp5X19hX2BiYGFjZGRnZGVoZmZpfH1+gYKDhIWGiIqMj5GTk5WXlJaWp6qsu767wsXCx8rH2Nze4ebn5+ztsVhOVQAAAEN0Uk5TAAICAwQGDAwZHiAhMjQ1ODg6PlJTYWhtfoCLjZadoaOkq7C1t7i5vsDJyc3Q3Nzd4uPm5+jp6u/v7+/w9ff6/P39/otxtB4AAAEASURBVDhPpdDnTgJBFAXgRYqAFCmCNEFUEERERJbe7hE7RVB4/ycxkCEzu7BjIufXnJwvuckoCo8pGM1UKplo0KTsjCsHlpxr1x7pAeWrWOyyDPQi23sAUMPm1cscVoGAfneqKNk3xV6C6tSBONpu3txtxHWggJRYUyhod1sXIbGH0LVpgAfwid0HeDTAC3hlfW9wcJLM5y/S6zys81ir3SYsm916/c2z5GkcMnAq7CJYZhm4MQItBupGYMBAk8+zj/GPFLwTjaRgSPQqBU9EL/uBZ6I3KfgkmkjBfPq1kII/P+qf4M4IdBg4MwJFBhziDfHCMQPK0Xl1G/Tv/avtFzQPtEKn9N7CAAAAAElFTkSuQmCC"
    },
    "title": "Lock"
  },

@Toxblh
Copy link
Owner

Toxblh commented Jun 14, 2018

@kgunnit Do work other buttons? And that is MacOS version and MTMR version

@Toxblh Toxblh closed this as completed Jun 14, 2018
@Toxblh Toxblh reopened this Jun 14, 2018
@trntv
Copy link
Author

trntv commented Jun 14, 2018

@kgunnit Thank you, that worked for me too (title AFTER image). MTMR - 0.16.2, MacOS - 10.13.5 (17F77)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants