#!/bin/bash # Changes brightness through dmenu (because il ike my eyes) level=$(echo "$(seq 1 100)" | dmenu -i -p 'Brightnesss from 1-100') [ -z "$level" ] && exit 0 percentage=$(echo "scale=2;" "$level/100" | bc -l) [ -z "$percentage" ] && exit 0 screens="$(xrandr | grep ' connected' | awk '{print $1}')" for scr in $screens;do xrandr --output "$scr" --brightness $percentage done