-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add Gamma ramp; properly cumulate temp, brightness, gamma, inversion
Inversion now flips the cumulated gamma ramp left-to-right (rather than upside-donw), keeping any temperature, brightness and gamma adjustments. The script toggle-invert-display.sh inverts the display colors and adjusts gamma in the inverted mode to compensate for perceptual nonlinearity.
- Loading branch information
1 parent
3a03aa5
commit 983b152
Showing
5 changed files
with
104 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh | ||
|
||
# The human eye is more sensitive to contrast at high than at low | ||
# levels of intensity. Thus, contast at high levels of intensity is | ||
# lost if the display is inverted. This script compensates for this by | ||
# gamma correction. The value of γ=0.6 is not based on any theory; | ||
# adjust it to your liking. | ||
|
||
dbus="rs.wl-gammarelay / rs.wl.gammarelay" | ||
|
||
if [ "$(busctl --user get-property $dbus Inverted)" = "b false" ]; then | ||
busctl --user set-property $dbus Inverted b true | ||
busctl --user set-property $dbus Gamma d 0.6 | ||
else | ||
busctl --user set-property $dbus Inverted b false | ||
busctl --user set-property $dbus Gamma d 1.0 | ||
fi |