Created
May 6, 2024 20:53
-
-
Save Bluey26/0e9b5d09d97c62bdb806f16cee50ef3d to your computer and use it in GitHub Desktop.
GammaStep filedialog, which uses 'qarma' to set an specific screen temperature and close the window. Has to be used with a .desktop file pointing to this .sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
menu=("4500" "3500" "RemoveEffect") | |
answer=`zenity --list --column=Menu ${menu[@]} --title "GammastepColor" --height 200` | |
if [ "$answer" = "4500" ]; then | |
#We Verify if there is a gammastep process running and if its running, we kill it before applying new temperature: | |
processo=$(pidof gammastep) | |
if [[ -n $processo ]]; then | |
kill $processo | |
fi | |
gammastep -O 4500 | |
exit 1 | |
elif [ "$answer" = "${menu[1]}" ]; then | |
processo=$(pidof gammastep) | |
if [[ -n $processo ]]; then | |
kill $processo | |
fi | |
gammastep -O 3500 | |
exit 1 | |
elif [ "$answer" = "${menu[2]}" ]; then | |
processo=$(pidof gammastep) | |
if [[ -n $processo ]]; then | |
kill $processo | |
fi | |
exit 1 | |
else | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Terminal version (with custom value option):
This can be launched with a custom .desktop file which points to that .sh file: