linux screen brightness command line 1

linux screen brightness command line

$ xrandr | grep " connected" | cut -f1 -d " "
VGA1
$ xrandr --output VGA1 --brightness 0.7

Here is what the above code is Doing:
1. xrandr | grep ” connected” | cut -f1 -d ” ”
– xrandr is a command line tool to interact with the X RandR extension [see xrandr(1) for more details]
– grep ” connected” returns a list of connected outputs
– cut -f1 -d ” ” extracts the first field delimited by a space, which in this case is the output’s name
2. xrandr –output VGA1 –brightness 0.7
– xrandr again, this time with two arguments
– –output specifies the connected output we’re referring to
– –brightness specifies the brightness level we want

Similar Posts