Skip to content

Instantly share code, notes, and snippets.

@rangersmyth74
Last active August 22, 2022 05:09
Show Gist options
  • Save rangersmyth74/d479c0074c9b31d99b47d880c6be1b17 to your computer and use it in GitHub Desktop.
Save rangersmyth74/d479c0074c9b31d99b47d880c6be1b17 to your computer and use it in GitHub Desktop.
Rogauracore BASH menu script for Asus ROG laptops - Turns on the Keyboard lights - Once rogauracore has been installed.
#!/bin/bash
server_name=$(hostname)
echo "Hello, what is your name??"
read -r name
echo "Hello $name ya wonderful person!!" | lolcat
sleep 1
#echo "what city shall we research for the Weather?"
#sleep 1
#read -r city
#curl http://wttr.in/"$city"
function Rogauracore-1() {
echo ""
echo "Turn on the Keyboard lights ${server_name} to 1?: "
echo ""
rogauracore brightness 1
echo ""
}
function Rogauracore-2() {
echo ""
echo "Turn on the Keyboard brightness ${server_name} to 2?: "
echo ""
rogauracore brightness 2
echo ""
}
function Rogauracore-3() {
echo ""
echo "Turn on the Keyboard brightness ${server_name} to 3?: "
echo ""
rogauracore brightness 3
echo ""
}
function single_breathing() {
echo ""
echo "Turn the Keyboard Red on ${server_name} ?: "
echo ""
rogauracore single_breathing ff0000 ff0000 2
echo ""
}
function single_static() {
echo ""
echo "Turn the Static Red Keyboard on ${server_name} ?: "
echo ""
rogauracore single_static ff0000
echo ""
}
function multi_breathing() {
echo ""
echo "Turn the Multi Colour Keyboard on ${server_name} ?: "
echo ""
rogauracore multi_breathing F60000 FF8C00 FFEE00 4DE94C 2
echo ""
}
function Help() {
echo ""
echo "Rogauracore Help for more commands for ${server_name} : "
echo ""
echo 'Rogauracore 1.5 - RGB keyboard control for Asus ROG laptops (c) 2019 Will Roberts
Usage: use the rogauracore COMMAND ARGUMENT by using one of the following:
single_static
single_breathing
single_colorcycle
multi_static
multi_breathing
red
green
blue
yellow
gold
cyan
magenta
white
black
rainbow
brightness
initialize_keyboard '
echo ""
}
function Command1() {
echo ""
echo "Run a Rogauracore Command for ${server_name} ?: "
echo ""
read -r Command
echo ""
echo "Great $name lets do that!!" | lolcat
echo ""
}
function all_checks() {
Rogauracore-1
Rogauracore-2
Rogauracore-3
single_breathing
single_static
multi_breathing
Help
Command1
}
##
# Color Variables
##
green='\e[32m'
blue='\e[34m'
clear='\e[0m'
##
# Color Functions
##
ColorGreen(){
echo -ne $green$1$clear
}
ColorBlue(){
echo -ne $blue$1$clear
}
menu(){
echo -ne "
""
$(ColorGreen 'KaliROG Rogauracore Menu')
""
$(ColorGreen '1)') Rogauracore Brightness 1
$(ColorGreen '2)') Rogauracore Brightness 2
$(ColorGreen '3)') Rogauracore Brightness 3
$(ColorGreen '4)') Rogauracore Single Colour Breathing Red
$(ColorGreen '5)') Rogauracore Single Colour Static Red
$(ColorGreen '6)') Rogauracore Multi Colour Breathing Rainbow
""
$(ColorGreen '8)') Enter a Rogauracore command
""
$(ColorGreen '9)') Rogauracore Help
""
$(ColorGreen '0)') Exit
""
$(ColorBlue 'Choose an option:') "
read a
case $a in
1) Rogauracore-1 ; menu ;;
2) Rogauracore-2 ; menu ;;
3) Rogauracore-3 ; menu ;;
4) single_breathing ; menu ;;
5) single_static ; menu ;;
6) multi_breathing ; menu ;;
8) Command1 ; menu ;;
9) Help ; menu ;;
0) echo "Bye bye Ranger."; exit 0 ;;
*) echo -e $red"Wrong option."$clear; WrongCommand;;
esac
}
# Call the menu function
menu

Rogauracore BASH menu script for Asus ROG laptops that Turns on the Keyboard lights by ranger.

https://github.com/rangersmyth74/rogauracore

Installation Instructions and References

How to start the script.

  1. Download this file or copy the raw output and paste it into a new file on your system, save it.
  2. On the command line and in the folder where you downloaded or created the file, run the following command.

$ bash rogauracore.sh

Usage: use the rogauracore COMMAND ARGUMENT by using one of the below options once the rogauracore package has been installed and working. Check the github link for the rogauracore package:

$ rogauracore single_static red

single_static
single_breathing
single_colorcycle
multi_static
multi_breathing
red
green
blue
yellow
gold
cyan
magenta
white
black
rainbow
brightness
initialize_keyboard 

These above commands can be used in the rogauracore.sh script, meaning you can change this script amyway you want so you can have any colour you like appear.

Installation Errors and fix.

If there is any problems with bash, then use zsh instead by changing the top line in rogauracore.sh from...

#!/bin/bash to #!/bin/zsh

Then to run the command with zsh instead of bash to start the script.

$ zsh rogauracore.sh

This should solve any running errors.

Notes

I copied the menu but what I did was change the code updating.

I left the Kernel version in as this was one of the examples.

The link for the main file is >

I added in whats your name from another script taken from making your own weather script bash script with NetworkChuck on YouTube.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment