Skip to content

Instantly share code, notes, and snippets.

@Azer5C74
Last active May 8, 2022 10:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Azer5C74/264a178719afe83acfa2204120550f4f to your computer and use it in GitHub Desktop.
Save Azer5C74/264a178719afe83acfa2204120550f4f to your computer and use it in GitHub Desktop.
Adjusting screen brightness on Linux Mint Mate
#!/bin/bash
B=$(xrandr --verbose | awk '/Brightness/ { print $2; exit }')
A=0.2
C=$(echo "$B - $A" | bc)
M=$(xrandr | grep " connected" | cut -f1 -d " ")
xrandr --output $M --brightness $C
#!/bin/bash
B=$(xrandr --verbose | awk '/Brightness/ { print $2; exit }')
A=0.2
C=$(echo "$B + $A" | bc)
M=$(xrandr | grep " connected" | cut -f1 -d " ")
xrandr --output $M --brightness $C
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment