Created
March 7, 2019 14:06
-
-
Save bergpb/a204a9f8ae01d3376eab55f8668d75fa to your computer and use it in GitHub Desktop.
Adjust Brightness in second monitor with XFCE.
This file contains hidden or 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
| import sys | |
| import subprocess | |
| value = float(sys.argv[1]) | |
| print('Value is {}.'.format(value)) | |
| if (value == 0 or value > 9): | |
| print('Only values between 1 and 9 is permited.') | |
| else: | |
| subprocess.call(["xrandr --output HDMI-1 --brightness {}".format(value/10)], shell=True) | |
| print('Brightness adjusted to {}.'.format(value/10)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment