Skip to content

feat(systray): add volume limiter toggle to tray menu#40

Open
CaWu009 wants to merge 2 commits into
elegos:developfrom
CaWu009:feature/systray-volume-limiter
Open

feat(systray): add volume limiter toggle to tray menu#40
CaWu009 wants to merge 2 commits into
elegos:developfrom
CaWu009:feature/systray-volume-limiter

Conversation

@CaWu009
Copy link
Copy Markdown

@CaWu009 CaWu009 commented May 26, 2026

What

Adds a volume limiter toggle to the system tray context menu,
positioned below "Open Arctis Manager".

The toggle is only shown when the connected device supports
volume limiter (Nova 5, Nova 7, Nova Pro).

Why

Previously, toggling volume limiter required opening the full
main window. This makes it accessible with a single right-click
on the tray icon.

Changes

  • systray_app.py: subscribe to settings, add checkable
    QAction for volume limiter
  • dbus_wrapper.py: subscribe to SettingsChanged D-Bus signal
    so all clients stay in sync when settings change from any source

@CaWu009 CaWu009 force-pushed the feature/systray-volume-limiter branch 2 times, most recently from 5955d25 to 3e74427 Compare May 26, 2026 10:58
@CaWu009 CaWu009 force-pushed the feature/systray-volume-limiter branch from 3e74427 to b6fac77 Compare May 26, 2026 11:01
@elegos
Copy link
Copy Markdown
Owner

elegos commented May 28, 2026

Hello @CaWu009 ,

I'm sorry, but I can't accept this merge request at this stage: the setting is not supported on all devices, and would lead to confusion for people not having it.

I can propose you a couple of alternative solutions:

  1. Make a new section in the main window "Systray toggles" where you can enable or disable all the toggable options, per device. This would let the user select whatever settings he/she wants to have as a shortcut in the system tray app
  2. Add support for keyboard shortcuts (again: toggable options only) with a notification about the change. The shortcut management should be done again based on the list of available options for the current device.

In any case both the solutions would need a management whenever the device is turned on (refresh of the toggable options / shortcuts) and off (removal of toggable options / shortcuts)

CaWu009 pushed a commit to CaWu009/Linux-Arctis-Manager that referenced this pull request May 29, 2026
Generalizes the hard-coded volume_limiter tray entry into a per-device,
user-selectable set of toggle shortcuts (addresses PR elegos#40 review feedback):

- New Systray toggles section in the main window to choose which of the
  connected device's TOGGLE settings appear in the tray. Driven entirely by
  settings_config (no hard-coding); only device-scoped toggles are listed.
- Per-device persistence of the selection (DeviceSettings.systray_toggles)
  with backward-compatible reading of the old flat settings-file format.
- New SetSystrayToggle D-Bus method and systray_toggles field in the
  settings payload (UI preference; never drives the device).
- Daemon emits SettingsChanged on device connect/disconnect so the panel
  and tray refresh on connect and clear on disconnect.
- Systray renders only pinned toggles; toggling sends the int on/off value.
- docs/dbus.md, CHANGELOG and i18n updated; unit tests for settings and the
  D-Bus service.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Generalizes the hard-coded volume_limiter tray entry into a per-device,
user-selectable set of toggle shortcuts (addresses PR elegos#40 review feedback):

- New Systray toggles section in the main window to choose which of the
  connected device's TOGGLE settings appear in the tray. Driven entirely by
  settings_config (no hard-coding); only device-scoped toggles are listed.
- Per-device persistence of the selection (DeviceSettings.systray_toggles)
  with backward-compatible reading of the old flat settings-file format.
- New SetSystrayToggle D-Bus method and systray_toggles field in the
  settings payload (UI preference; never drives the device).
- Daemon emits SettingsChanged on device connect/disconnect so the panel
  and tray refresh on connect and clear on disconnect.
- Systray renders only pinned toggles; toggling sends the int on/off value.
- docs/dbus.md, CHANGELOG and i18n updated; unit tests for settings and the
  D-Bus service.
@CaWu009 CaWu009 force-pushed the feature/systray-volume-limiter branch from 062733f to eea93a4 Compare May 29, 2026 10:01
@CaWu009
Copy link
Copy Markdown
Author

CaWu009 commented May 29, 2026

Thanks for the detailed feedback — makes sense, hard-coding a single setting wasn’t the right approach.

I’ve reworked the PR around Option 1. The volume-limiter special case is gone now. Instead, there’s a new “Systray toggles” section in the main window where the user can pick which toggle settings should show up in the tray menu.

The list is built from settings_config for the connected device, so it’s not tied to any specific setting. If a device doesn’t expose any toggle settings, the section just stays empty.

A few other changes included:

  • systray toggle selection is saved per device, in the device settings file
  • old flat-format settings are still read for compatibility
  • the tray menu now only shows pinned toggles for the current device
  • connect/disconnect now emits SettingsChanged, so the panel and tray refresh properly when a device is connected or removed
  • added SetSystrayToggle as a D-Bus method for this UI preference
  • documented it in docs/dbus.md
  • added tests for settings persistence and the D-Bus service

I left the keyboard-shortcuts part out for now to keep this PR focused. That can be a separate change later if you still want it.

One thing I’m not fully sure about is the layout: I put this in its own side-panel section for now, but I can also move it into the existing Device panel, for example as a “show in tray” checkbox next to each toggle.

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.

2 participants