get_brightness ( display = 1 ) # get the brightness for a named monitor benq_brightness = sbc. get_brightness ( display = 0 ) # get the brightness of the secondary display (if connected) secondary_display_brightness = sbc. get_brightness () # get the brightness of the primary display primary_display_brightness = sbc. Usage: import screen_brightness_control as sbc # get the current screen brightness (for all detected displays) all_screens_brightness = sbc. verbose_error - a boolean value to control how much detail any error messages should contain.On Windows this can be 'wmi' or 'vcp' and on Linux this can be 'light', 'xrandr', 'ddcutil', 'sysfiles' or 'xbacklight' method - the OS specific method to use.This can be an integer or a string (EDID, serial, name or model) display - the specific display you wish to adjust.Raises ScreenBrightnessError upon failure It may return a list of values if you have multiple, brightness adjustable monitors. Returns the current screen brightness as a percentage. get_brightness( display=None, method=None, verbose_error=False) You can read the full documentation for this project for more details but here are the basics. > -v, -verbose some messages will be more detailed > -m METHOD, -method METHOD specify which method to use > -f VALUE, -fade VALUE fade the brightness to this value > -g, -get get the current screen brightness > -s VALUE, -set VALUE set the brightness to this value > -d DISPLAY, -display DISPLAY the display to be used > -h, -help show this help message and exit python -m screen_brightness_control -help You can call this module from your command line or use it as a python library (see the documentation section below). Something to be aware of is that xrandr does not change the backlight of the display, it just changes the brightness by applying a filter to the pixels to make them look dimmer/brighter. Here is a quick outline of each program: Program If you do not wish to install any 3rd party programs you will have to run this module as root. Pip3 install screen-brightness-control GitHub: git clone įor running on Linux you may need to install one of these programs: xrandr, ddcutil, light or xbacklight. Supports Windows and most flavours of Linux. A Python tool for controlling the brightness of your monitor.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |