Move icon from dock to menu bar
Opened this issue · 9 comments
Description
right now the programm has to be open all the time and that takes a space in the dock bar
it would be nice if this icon can be removed and only have it shown on the top in the menu bar
Hello, @anfragment !
I would like to work on this issue, please assign me!
Hello @mulla028! Are you familiar with Objective C and/or macOS system programming?
@anfragment,
I’m not currently familiar with Objective-C or macOS programming, but I’m very enthusiastic about learning and contributing to this issue. As a student who regularly learns new programming languages, I’m confident in my ability to quickly pick up the necessary skills and deliver a solution. I’m committed to figuring everything out on my own, and I’d greatly appreciate it if you could assign this issue to me! Currently, I am using macOS so it won't be a huge problem to test it. Let me take that shot 🙂
@mulla028 of course, I'd be glad to have your help! The reason I asked is that I previously tried implementing this by copying some code from the getlantern/systray repo. Unfortunately, it didn't work due to some naming conflicts with Wails's data structures during linking. I love your enthusiasm, though - best of luck if you decide to go the same path!
Before starting, please check out our getting started guide, it'll help you get up to speed with the project. If possible, try to replicate the functionality of the tray icon on Windows. Let me know if you need the icon in a specific format or color for placement in the tray, or if you have any other questions. 🫡
@mulla028 of course, I'd be glad to have your help! The reason I asked is that I previously tried implementing this by copying some code from the getlantern/systray repo. Unfortunately, it didn't work due to some naming conflicts with Wails's data structures during linking. I love your enthusiasm, though - best of luck if you decide to go the same path! Before starting, please check out our getting started guide, it'll help you get up to speed with the project. If possible, try to replicate the functionality of the tray icon on Windows. Let me know if you need the icon in a specific format or color for placement in the tray, or if you have any other questions. 🫡
Rahmet, @anfragment! If I have any problems, I will definitely contact you!
Thank you for sharing sources, though!
@anfragment, Hello!
I've tried to implement it in multiple ways, using systray, trayhost etc... Every existing library that helps to implement it.
However, all of them are conflicting with wails v2. I even tried to fork systray and rename all conflict objects 😆
Question: May be you know the solution that wouldn't conflict with wails? I would appreciate any suggestion.
Now I am about to implement it in pure Objective-C integrating with Go lang
@anfragment another thing that I want to mention is that implementing it using Objective-C will require to rename the file manager_nonwindows.go
to manager_macos.go
. So these changes are macOS specific and the first line will be changed from //go:build !windows
to //go:build darwin
Hello @mulla028!
May be you know the solution that wouldn't conflict with wails?
I was in a similar state of confusion during my attempts to make it work, so your guess is just as good as mine. :) As far as I remember, the linker itself doesn't provide much useful information on the source of the problem. I'd try looking for every identifier in the systray's code within the Wails codebase. Perhaps that will help us identify the source of the issue.
implementing it using Objective-C will require to rename the file
Indeed. You can rename the file to manager_darwin.go
to avoid having to add a build tag to the top of the file.
From https://go.dev/wiki/TargetSpecific:
Remember that if a file ends in _$GOARCH.go, that counts as a build tag.