Adding Icons to Tabs - write()

8 views
Skip to first unread message

Dennis Bareis

unread,
Aug 24, 2021, 2:28:44 AM8/24/21
to CopyQ
Hi,

    var TitleMime = 'application/x-copyq-item-notes'
    var IconMime  = 'application/x-copyq-item-icon'
    var IconText  = "DB$/test.ico"
    
    CurrentTime   = new Date()
    var TitleText = CurrentTime

   write(0, MimeType, What, TitleMime, TitleText, IconMime, IconText)

While the mimetypes are listed, they don't say what the data contains, the above doesn't work but it does add a pencil icon.

How do I get the standard icons as well as my file based icons.  I thought I'd add an icon to a note then examine the data but I can't work out how to manually add them (I haven't done that before).

Thanks

Dennis Bareis

unread,
Dec 7, 2021, 5:54:00 PM12/7/21
to CopyQ
Anyone?

Lukáš Holeček

unread,
Dec 8, 2021, 5:55:33 AM12/8/21
to Dennis Bareis, CopyQ
The "application/x-copyq-item-icon" format contains the image data, not image path.

var f = File(IconText)
f.openReadOnly()
var IconData = r.readAll()
write(0, MimeType, What, TitleMime, TitleText, IconMime, IconData)

Note: Some less common image formats may not be recognized by CopyQ.

Lukas

--
You received this message because you are subscribed to the Google Groups "CopyQ" group.
To unsubscribe from this group and stop receiving emails from it, send an email to copyq+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/copyq/1109d255-543b-4b41-ba06-be9b00a02e25n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages