#!/bin/bash # Init ########################## # # Notify ##################### # # # if [ "$1" = "notify" ];then # # lnotify $2 $3 # # exit 0 # # fi # # # # ############################## # # # Variables ################## # # # ir="irsend SEND_ONCE light" # # col="/ram/light-col" # # pwr="/ram/light-pwr" # # ccol="cat /ram/light-col" # # cpwr="cat /ram/light-pwr" # # # # if [ "$2" = "nosave" ];then # # col="nul" # # pwr="nul" # # fi # # # # ############################## # # ################################# # Help ####################################################### # # No Input #################################### # # # if [ "$1" = "" ];then # # echo "'Magic Lighting' frontend by TDGalea." # # echo "For usage with config by MPParsley" # # echo "Usage: light " # # echo "" # # echo "Use 'light help' more information." # # echo "" # # exit 0 # # fi # # # # ############################################### # # # Requested ############################################### # # # if [ "$1" = "help" ];then # # echo "Usage: light " # # echo "" # # echo "Commands:" # # cat /etc/lirc/lircd.conf|grep KEY_|grep -o "#.........." # # echo "" # # exit 0 # # # # fi # # ########################################################### # # ############################################################## # Main ################################ # # Power ###################### # # # if [ "$1" = "on" ];then # # $ir key_power # # echo $1>$pwr # # fi;if [ "$1" = "off" ];then # # $ir key_power2 # # echo $1>$pwr # # fi # # # # ############################## # # # Brightness ################## # # # if [ "$1" = "up" ];then # # $ir key_brightnessup # # fi;if [ "$1" = "down" ];then # # $ir key_brightnessdown # # fi # # # # ############################### # # # Colours ########################## # # # if [ "$1" = "red" ];then # # $ir key_r # # echo $1>$col # # fi;if [ "$1" = "green" ];then # # $ir key_g # # echo $1>$col # # fi;if [ "$1" = "blue" ];then # # $ir key_b # # echo $1>$col # # fi;if [ "$1" = "white" ];then # # $ir key_w # # echo $1>$col # # fi;if [ "$1" = "orange" ];then # # $ir key_o # # echo $1>$col # # fi;if [ "$1" = "lgreen" ];then # # $ir key_kp1 # # echo $1>$col # # fi;if [ "$1" = "lblue" ];then # # $ir key_kp2 # # echo $1>$col # # fi;if [ "$1" = "lred" ];then # # $ir key_kp3 # # echo $1>$col # # fi;if [ "$1" = "turquoise" ];then # # $ir key_t # # echo $1>$col # # fi;if [ "$1" = "purple" ];then # # $ir key_kp5 # # echo $1>$col # # fi;if [ "$1" = "lorange" ];then # # $ir key_kp6 # # echo $1>$col # # fi;if [ "$1" = "aqua" ];then # # $ir key_kp7 # # echo $1>$col # # fi;if [ "$1" = "yellow" ];then # # $ir key_y # # echo $1>$col # # fi;if [ "$1" = "lilac" ];then # # $ir key_kp8 # # echo $1>$col # # fi;if [ "$1" = "cblue" ];then # # $ir key_kp9 # # echo $1>$col # # fi;if [ "$1" = "pink" ];then # # $ir key_p # # echo $1>$col # # fi # # # # #################################### # # # Modes ######################### # # # if [ "$1" = "flash" ];then # # $ir key_f1 # # echo $1>$col # # fi;if [ "$1" = "strobe" ];then # # $ir key_f2 # # echo $1>$col # # fi;if [ "$1" = "fade" ];then # # $ir key_f3 # # echo $1>$col # # fi;if [ "$1" = "smooth" ];then # # $ir key_f4 # # echo $1>$col # # fi # # # # ################################# # # ####################################### exit 0