Skip to content

A portable version of go systray, using stdin/stdout to communicate with other language

License

Notifications You must be signed in to change notification settings

one-click-studio/systray-portable

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

systray-portable

A portable version of go systray, using stdin/stdout to communicate with other language.

A fork from https://github.com/zaaack/systray-portable.

Protocol

Each line is a json string.

tray binary =>
=> ready {"type": "ready"}
<= init menu (with a separator)

{
  "icon": "<base64 string of image>",
  "title": "Title",
  "tooltip": "Tooltips",
  "items":[{
    "title": "aa",
    "tooltip":"bb",
    "checked": true,
    "enabled": true,
    "hidden": false
  }, {
    "title": "<SEPARATOR>",
    "tooltip":"",
    "checked": true,
    "enabled": true,
    "hidden": false
  }, {
    "title": "aa2",
    "tooltip":"bb",
    "checked": false,
    "enabled": true,
    "hidden": false
  }]}

=> clicked

{
  "type":"clicked",
  "item":{"title":"aa","tooltip":"bb","enabled":true,"checked":true},
  "menu":{"icon":"","title":"","tooltip":"","items":null},
  "seq_id":0
}

<= update-item / update-menu / update-item-and-menu

{
  "type": "update-item",
  "item": {"title":"aa3","tooltip":"bb","enabled":true,"checked":true},
  "seq_id": 0
}

<= exit gracefully

{
  "type": "exit"
}

Binary

main_xxx_release: go build -ldflags "-s -w" tray.go
main_xxx: go build tray.go

About

A portable version of go systray, using stdin/stdout to communicate with other language

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 93.5%
  • JavaScript 6.5%