infernix / samsung_tabpro_s

Various scripts and quirks for Samsung TabPro S tablets
The Unlicense
25 stars 6 forks source link

Gamma #6

Open rjbergerud opened 4 years ago

rjbergerud commented 4 years ago

Calling xrandr --output eDP1 --brightness 0.5 also seems to reset the gamma to 1.0:1.0:1.0, which interferes with applications like redshift.

Something like this might work, except in the case there are multiple monitors and with different gamma values:

gamma_val=$(xrandr --verbose | grep "Gamma:" | grep --only-matching "[0-9]\.[0-9]:[0-9]\.[0-9]:[0-9]\.[0-9]")
xrandr --output eDP1 --brightness "${luminance}" --gamma "${gamma_val}"

Thoughts?

btw just set up this tabpro with manjaro kde and using this repo, very happy with it! Thanks for putting this out there.

rjbergerud commented 4 years ago

The second regex should actually be "[0-9]\.[0-9]+:[0-9]\.[0-9]+:[0-9]\.[0-9]+ but I can't seem to get the regex to work for instance when when my output is

   Gamma:      0.77:0.91:1.0