GUI Display Brightness Control v0.2, updated 02.10.2019
Posted: 06 Feb 2019 20:52
!! TIP !! -- GUI Display Brightness Control -- 02.06.2019
I previously posted a CLI version of this same process here:
-- viewtopic.php?f=74&t=7465
The GUI is possible via Zenity (it's kind of like editing Excel formulas in days of yore -- all on one line).
Create a launcher for the bash script on the panel and you are all "set" -- Good Luck!
I previously posted a CLI version of this same process here:
-- viewtopic.php?f=74&t=7465
The GUI is possible via Zenity (it's kind of like editing Excel formulas in days of yore -- all on one line).
Code: Select all
#!/bin/bash
# vb-set - v0.1 - Video/Display Brightness Control -- 02.06.2019
# ==============================================================
# SolydXee XFCE x64
# ** Acknowledgements ** ---------------------------------------
# Les Pounder: https://bigl.es/author/les/
# --------------------------------------------------------------
#
# the CLI command: xrandr -q |grep " connected"
# -- should return the ID of displays currently
# active on your system.
# --------------------------------------------------------------
# !! NOTE: NOT advised TO EXCEED "1.0" setting !!
# *** Variables (start) ****************************************
# **************************************************************
# DISPLAYS=2 # Connected Displays
DISPLAY1="HDMI-1" # ID: Display 1
DISPLAY2="HDMI-2" # ID: Display 2
# *** Variables (end) *****************************************
# *************************************************************
ans=$(zenity --width=150 --height=320 --list --title "Display" --text "== Adjust Brightness" --checklist --column "[x]" --column "Level" FALSE "100%" FALSE "90%" FALSE "80%" FALSE "70%" FALSE "60%" FALSE "50%" FALSE "40%" FALSE "30%");
echo $ans
if [ $ans == "100%" ]; then
xrandr --output $DISPLAY1 --brightness 1.0 &
xrandr --output $DISPLAY2 --brightness 1.0 &
elif [ $ans == "90%" ]; then
xrandr --output $DISPLAY1 --brightness 0.9 &
xrandr --output $DISPLAY2 --brightness 0.9 &
elif [ $ans == "80%" ]; then
xrandr --output $DISPLAY1 --brightness 0.8 &
xrandr --output $DISPLAY2 --brightness 0.8 &
elif [ $ans == "70%" ]; then
xrandr --output $DISPLAY1 --brightness 0.7 &
xrandr --output $DISPLAY2 --brightness 0.7 &
elif [ $ans == "60%" ]; then
xrandr --output $DISPLAY1 --brightness 0.6 &
xrandr --output $DISPLAY2 --brightness 0.6 &
elif [ $ans == "50%" ]; then
xrandr --output $DISPLAY1 --brightness 0.5 &
xrandr --output $DISPLAY2 --brightness 0.5 &
elif [ $ans == "40%" ]; then
xrandr --output $DISPLAY1 --brightness 0.4 &
xrandr --output $DISPLAY2 --brightness 0.4 &
elif [ $ans == "30%" ]; then
xrandr --output $DISPLAY1 --brightness 0.3 &
xrandr --output $DISPLAY2 --brightness 0.3 &
else
exit 0
fi