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

Move icon from dock to menu bar #130

Open
ghost opened this issue Oct 30, 2024 · 8 comments
Open

Move icon from dock to menu bar #130

ghost opened this issue Oct 30, 2024 · 8 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Ideal for external contributors in progress Actively under development

Comments

@ghost
Copy link

ghost commented Oct 30, 2024

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

@ghost ghost added the enhancement New feature or request label Oct 30, 2024
@anfragment anfragment added help wanted Ideal for external contributors good first issue Good for newcomers todo Pending action labels Nov 4, 2024
@mulla028
Copy link

mulla028 commented Nov 15, 2024

Hello, @anfragment !
I would like to work on this issue, please assign me!

@anfragment
Copy link
Owner

Hello @mulla028! Are you familiar with Objective C and/or macOS system programming?

@mulla028
Copy link

mulla028 commented Nov 15, 2024

@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 🙂

@anfragment
Copy link
Owner

@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. 🫡

@anfragment anfragment added in progress Actively under development and removed todo Pending action labels Nov 15, 2024
@mulla028
Copy link

mulla028 commented Nov 15, 2024

@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!

@mulla028
Copy link

@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

@mulla028
Copy link

@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

@anfragment
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Ideal for external contributors in progress Actively under development
Projects
None yet
Development

No branches or pull requests

2 participants