Advertisement
superr

x10_gui

Jan 12th, 2013
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. openLib=$(zenity --window-icon=$HOME/My_Stuff/Commands/Screensaver.png --width 200 --height 230 --list --title="Heyu GUI" --text "What would you like to do?" --radiolist --column "Select" --column "Function" TRUE "Erase Interface" FALSE "Upload Normal" FALSE "Upload Vacation" FALSE "Set Clock" FALSE "Change Battery")
  4. if [ "$?" = 1 ] ; then
  5. exit
  6. fi
  7.  
  8. if [ "$openLib" == "Erase Interface" ] ; then
  9.  
  10. if cat $HOME/.heyu/x10config ; then
  11. xterm -e "heyu erase";
  12.  
  13. fi
  14.  
  15. elif [ "$openLib" == "Upload Normal" ] ; then
  16.  
  17. if cat $HOME/.heyu/x10config2 ; then
  18. xterm -e "heyu upload";
  19.  
  20. elif cat $HOME/.heyu/x10config1 ; then
  21. mv $HOME/.heyu/x10config $HOME/.heyu/x10config2
  22. mv $HOME/.heyu/x10config1 $HOME/.heyu/x10config
  23. xterm -e "heyu upload";
  24.  
  25. fi
  26.  
  27. elif [ "$openLib" == "Upload Vacation" ] ; then
  28.  
  29. if cat $HOME/.heyu/x10config1 ; then
  30. xterm -e "heyu upload";
  31.  
  32. elif cat $HOME/.heyu/x10config2 ; then
  33. mv $HOME/.heyu/x10config $HOME/.heyu/x10config1
  34. mv $HOME/.heyu/x10config2 $HOME/.heyu/x10config
  35. xterm -e "heyu upload";
  36.  
  37. fi
  38.  
  39. elif [ "$openLib" == "Set Clock" ] ; then
  40.  
  41. if cat $HOME/.heyu/x10config ; then
  42. xterm -e "heyu setclock";
  43.  
  44. fi
  45.  
  46. elif [ "$openLib" == "Change Battery" ] ; then
  47.  
  48. if cat $HOME/.heyu/x10config ; then
  49. xterm -e "heyu newbattery";
  50.  
  51. fi
  52.  
  53. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement