ledoge / novideo_srgb

Calibrate monitors to sRGB or other color spaces on NVIDIA GPUs, based on EDID data or ICC profiles
GNU General Public License v3.0
1.04k stars 40 forks source link

Feature Request: Toggle Keybind #58

Open jwiseuk opened 1 year ago

jwiseuk commented 1 year ago

First off, thanks for the time and effort you put in to this! Works perfectly. It would be great QOL if we could set a keybind (e.g. ctrl+alt+end) to toggle the clamp on and off.

PortugueseDriver commented 1 year ago

I'd like to see a way to toggle it on/off faster too. Even adding the ability to add commands to a shortcut would be good enough, just pin it to task bar to toggle it. Like adding -clamp at the end of shorcut.

sakgoyal commented 1 year ago

I think adding a -clamp option would be fantastic. would allow macros/keybinds/scheduled tasks etc to make this work even better. I have issues with this not working after sleep, so a scheduled task to reapply every login would be perfect

ExpressionlessCode commented 5 months ago

I wrote a small powershell script that functions as a toggle but modifying the config.xml "sdr-clamp" variable. Combined with AutoActions this will toggle the clamp on/off alongside HDR being enabled/disabled.

# Kill any running novideo_srgb.exe process
Stop-Process -Name "novideo_srgb" -erroraction 'silentlycontinue'
Start-Sleep -Seconds 1

# Toggle sdr-clamp true/false by modifying the config.xml file.
$filePath = '<Enter path to config.xml>'
$content = Get-Content $filePath
$currentValueFalse = Select-String -Path $filePath -Pattern 'clamp_sdr="false"'

if ($currentValueFalse -eq $null) {
    $content = $content -replace 'clamp_sdr="true"', 'clamp_sdr="false"'
}
else {
    $content = $content -replace 'clamp_sdr="false"', 'clamp_sdr="true"'
}

$content | Set-Content $filePath

# Start novideo_srgb.exe process
Start-Process -FilePath "<Enter path to novideo_srgb.exe>" -ArgumentList "-minimize"
Start-Sleep -Seconds 1