Skip to content

Conversation

@Cleboost
Copy link
Contributor

@Cleboost Cleboost commented Jun 30, 2025

This pull request introduces several changes to enhance functionality, improve user experience, and add support for system tray integration on Windows. The most significant updates include adding new commands for playback control, implementing a system tray feature for Windows, and updating the configuration and preferences UI to support the new "close to tray" behavior.

I avoid using the module because of compatibility issues with GTK or other related problems.

  • Windows Support
  • Mac Support (can't test so hard to dev)
  • Linux Support

close #294
close #70
close #389

Windows system tray integration:

  • Added WindowsTray struct in a new module windows_tray.rs to manage system tray functionality, including displaying a tray icon, handling right-click context menus, and responding to menu actions like playback control and application quit.
  • Updated Delegate to manage the system tray instance and handle commands related to the tray, such as TRAY_REMOVED and QUIT_APP_CLEAN. [1] [2] [3]
  • Added conditional compilation for Windows-specific tray functionality throughout the codebase. [1] [2]

Playback commands:

  • Introduced new selectors PLAY_PAUSE_TOGGLE and TRAY_REMOVED in cmd.rs to support toggling playback and handling tray removal events. [1] [2]
  • Updated playback.rs to handle the PLAY_PAUSE_TOGGLE command, allowing users to toggle between play and pause states.

Configuration updates:

  • Added a new close_to_tray field to the Config struct, enabling users to configure whether closing the app minimizes it to the system tray instead of quitting. [1] [2]
  • Updated the preferences UI in preferences.rs to include a checkbox for toggling the "close to tray" option.

Dependency updates:

  • Added winapi crate with necessary features to support Windows system tray functionality in Cargo.toml.

Introduces a Windows-specific system tray integration with icon, context menu, and playback controls. Adds a 'close to tray' option to preferences and config, and updates the delegate to handle tray events and clean app shutdown. Also adds new selectors for tray and playback toggle commands.
@Cleboost Cleboost marked this pull request as draft June 30, 2025 19:12
@rottakore
Copy link

What is the progress of this? It's ready to merge?

@Cleboost
Copy link
Contributor Author

Cleboost commented Nov 27, 2025

I need to add support for linux and mac
but I can't test mac.
I think il will try to finish linux and merge without mac.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Status bar icon and show/hide app through the icon Minimize to tray Close to system tray option

2 participants