ddcui icon indicating copy to clipboard operation
ddcui copied to clipboard

Enhancement: Remembering last selection of the View menu

Open HubKing opened this issue 1 year ago • 5 comments

It always starts with "Monitor summary". I run this app mainly to change the brightness/contrast, and probably a lot of other users are like that. I think that this app should either remember the last View selection, or have a setting that allows users to define the initial view.

HubKing avatar May 25 '24 20:05 HubKing

Thank you for the suggestion. My recollection is that I had considered this option and that it was non-trivial to implement. I will look into this again.

rockowitz avatar May 29 '24 12:05 rockowitz

Hello @rockowitz ,

I would like to dig into this. Could you please give a starting point any pointers really, and I'll try to take a stab at it

safa0 avatar May 18 '25 13:05 safa0

Here's what I see as the minimal implementation, which could later be extended:

  • Specifying the initial view (Summary, Capabilities, Features) on the command line.
  • It's already possible to specify the features shown in the Features view using option --custom-feature-set.
  • Assume that the first display is selected.

Directory cmdline contains the command line parser. ddcui_parsed_cmd.h contains struct Parsed_Ddcui_Cmd which is passed to the body of the program. Field Parsed_Ddcui_Cmd.view already exists to specify the initial view, but it's not linked to a command option. To simplify development, there are hidden options --f1 etc, which set CMD_FLAG_F1 etc in Parsed_Ddcui_Cmd.flags, so you can punt on dealing with the parser at first.

For your purposes, the bulk of the relevant logic is in mainwindow.cpp and monitor.cpp. Method init_monitors() does the work of setting things up. You're going to want to initially trigger the Features view using signalFeaturesView, instead of signalMonitorSummaryView. The mainline is pretty simple, the code complexity comes from all the niggardly details.

rockowitz avatar May 22 '25 04:05 rockowitz

It always starts with "Monitor summary". I run this app mainly to change the brightness/contrast, and probably a lot of other users are like that. I think that this app should either remember the last View selection, or have a setting that allows users to define the initial view.

@HubKing I have now took a stab at this, not really what you asked for but some presets, initial PoC in another repo and then we can port, you should be able to get the appimage from:

curl -L -o radiantctl.AppImage https://github.com/safa0/radiantctl/releases/latest/download/radiantctl_0.1.0_amd64.AppImage chmod +x radiantctl.AppImage ./radiantctl.AppImage

safa0 avatar Aug 19 '25 21:08 safa0

It always starts with "Monitor summary". I run this app mainly to change the brightness/contrast, and probably a lot of other users are like that. I think that this app should either remember the last View selection, or have a setting that allows users to define the initial view.

@HubKing I have now took a stab at this, not really what you asked for but some presets and feature detection on startup so basically faster to just change brightness/contrast its an initial PoC in another repo and then we can port, you should be able to get the appimage from:

curl -L -o radiantctl.AppImage https://github.com/safa0/radiantctl/releases/latest/download/radiantctl_0.1.0_amd64.AppImage chmod +x radiantctl.AppImage ./radiantctl.AppImage

safa0 avatar Aug 19 '25 21:08 safa0