When a profile changes, emit an event through DBus announcing just that.
Content
In the event list, ideally would be composed of:
Old profile id
To allow prompting for information if needed.
Old profile name
New profile id
New profile name
A set of change reason. E.g.
Changed to battery
Changed to mains
Received through DBus (Most common way is changing the profile in the drop down menu in the tray icon)
User pressed the power mode button.
New system profile
Screen brightness setting (or null if off)
New refresh rate (or null if off)
Fan profile (but not the whole parameters. Just the profile name. If the external program wants more, it needs to request separately.
Number of logical CPU cores active.
Rationale
Allow programs to integrate with TCC to add extra functionality. In my case, I want to change the CPU (Including slow-limit and tctl-temp) and GPU (Including the GPU shader clock) power settings based on the tcc profile chosen, the current system profile and the time of day ("Time of day" in TCC will be requested separately).
Note I requested more information than that because people are awesome and I'm sure someone will come up with awesome ways of using that extra information for make even better integrations and automations.
Note: Discussion about this happened at https://gitlab.com/tuxedocomputers/development/packages/tuxedo-drivers/-/merge_requests/8 which I will summarize what makes sense for this feature request.
What
When a profile changes, emit an event through DBus announcing just that.
Content
In the event list, ideally would be composed of:
null
if off)null
if off)Rationale
Allow programs to integrate with TCC to add extra functionality. In my case, I want to change the CPU (Including
slow-limit
andtctl-temp
) and GPU (Including the GPU shader clock) power settings based on the tcc profile chosen, the current system profile and the time of day ("Time of day" in TCC will be requested separately).Note I requested more information than that because people are awesome and I'm sure someone will come up with awesome ways of using that extra information for make even better integrations and automations.