EDIT: updated the script 2023-07-16 to include contrast (xgamma) and temperature (sct)
Note: This script requires sct to be installed to run correctly, which most systems will likely have.
A script to change the display monitor temperature/brightness/contrast by entering numbers in the terminal.
You should be able to put this script in /root/my-applications/bin in puppies, make it executable, and run it in a terminal just by typing brightness (or whatever name you choose for the script):
Code: Select all
#!/bin/bash
echo " ________________________________________________________"
echo " | |"
echo " | COLOR TEMPERATURE |"
echo " | Enter value between 1000 and 10,000 |"
echo " | note: 6500 is the median temperature |"
echo " |________________________________________________________|"
echo ""
read -p ' Enter TEMP: ' TEMP
sct $TEMP
echo ""
echo ""
MONITOR="$(xrandr | grep " connected" | cut -f1 -d " ")"
echo ""
echo " ________________________________________________________"
echo " | |"
echo " | BRIGHTNESS/BACKLIGHT |"
echo " | Enter value between 0.5 and 1.3 |"
echo " | WARNING! Lower values are dangerously invisible! |"
echo " | note: Some monitors may handle values above 1.3 |"
echo " |________________________________________________________|"
echo ""
read -p ' Enter BACKLIGHT: ' LEVEL
xrandr --output $MONITOR --brightness $LEVEL
echo ""
echo ""
echo " ________________________________________________________"
echo " | |"
echo " | CONTRAST |"
echo " | Enter value between 0.3 and 1.5 |"
echo " | WARNING! Lower values are dangerously invisible! |"
echo " |________________________________________________________|"
echo ""
read -p ' Enter CONTRAST: ' CONTRAST
xgamma -gamma $CONTRAST
echo ""
echo ""
printf "temperature = "$TEMP
echo ""
printf "brightness = "$LEVEL
echo""
printf "contrast = "$CONTRAST
echo ""
echo ""
GOODBYE=$(
read -p 'Enter settings again? y for yes, any character to exit: ' LEAVE
if [ $LEAVE = 'y' ]; then
/root/my-applications/bin/brightness
fi )
$GOODBYE
And the desktop entry
Code: Select all
[Desktop Entry]
Type=Application
Version=1.0
Name=brightness
GenericName=Display Brightness
Comment=Adjust Screen Brightness
Icon=utility48
Exec=brightness
Terminal=true
Categories=System;Utility;ConsoleOnly;
Keywords=system;brightness