Wednesday, February 25, 2026

Linux Change brightness in a click

Heres my my 0.8_Brightness.sh that I launch from meny with  "in terminal" checked


#!/bin/bash

xrandr --output HDMI-0 --brightness 0.8

xrandr --output DP-4 --brightness 0.8

xrandr --output DP-2 --brightness 0.8

xrandr --output DP-0 --brightness 0.8



xrandr                    :you need this one

--output                :I would have guessed set or something but .. well

HDMI or DP        :Use xrandr -q

--brightness            :this makes sense

Value of 1 is normal 0.5 is really dark


For easy restore to normal, just create another file with --brightness 1



#!/bin/bash

xrandr --output HDMI-0 --brightness 1

xrandr --output DP-4 --brightness 1


xrandr --output DP-2 --brightness 1

xrandr --output DP-0 --brightness 1


Don't forget to make the files executable

 

No comments:

Blog Archive