Skip to content

Commit

Permalink
chore: move icon to assets folder
Browse files Browse the repository at this point in the history
  • Loading branch information
fedragon committed Jul 10, 2024
1 parent 2ee42d0 commit b67d2c1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
6 changes: 6 additions & 0 deletions assets/embed.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package assets

import _ "embed"

//go:embed icon.svg
var Icon []byte
File renamed without changes
6 changes: 2 additions & 4 deletions cmd/tray/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@ import (
"golang.org/x/sync/errgroup"

"github.com/fedragon/bookmarkd/api"
"github.com/fedragon/bookmarkd/assets"
"github.com/fedragon/bookmarkd/internal"
)

//go:embed icon.svg
var icon []byte

func main() {
systray.Run(onReady, onExit)
}
Expand All @@ -38,7 +36,7 @@ func onReady() {
return run(gctx, &cfg)
})

systray.SetIcon(icon)
systray.SetIcon(assets.Icon)
systray.SetTooltip("bookmark'd: store bookmarks in Obsidian")
systray.SetOnClick(func(menu systray.IMenu) {
if err := menu.ShowMenu(); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion macos/bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function die {
}

APPNAME=bookmarkd
ICONNAME=../cmd/tray/icon.svg
ICONNAME=../assets/icon.svg

if [ ! -f $ICONNAME ]; then
die "Image file for icon not found"
Expand Down

0 comments on commit b67d2c1

Please sign in to comment.