Skip to content

Instantly share code, notes, and snippets.

@bergpb
Created March 7, 2019 14:06
Show Gist options
  • Select an option

  • Save bergpb/a204a9f8ae01d3376eab55f8668d75fa to your computer and use it in GitHub Desktop.

Select an option

Save bergpb/a204a9f8ae01d3376eab55f8668d75fa to your computer and use it in GitHub Desktop.
Adjust Brightness in second monitor with XFCE.
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