autoConky.sh 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #!/bin/bash
  2. idConky=`pidof conky | grep [0-9]`
  3. # if pidof conky | grep [0-9] > /dev/null
  4. # cp ~/.config/xfce4/desktop/icons.screen0-1264x982.rc ~/.config/xfce4/desktop/icons.screen0-1264x982_backup.rc
  5. sleep 60
  6. # cp ~/.config/xfce4/desktop/icons.screen0-1264x982_backup.rc ~/.config/xfce4/desktop/icons.screen0-1264x982.rc
  7. # sleep 2
  8. # xfdesktop --reload
  9. if [ -z ${idConky} ]; then
  10. # exec conky -c ~/.myScripts/conky/conkyrc2 2>&1 > /dev/null &
  11. #sleep 3
  12. exec conky -c ~/.myScripts/conky/conkyrc1_xfce 2>&1 > /dev/null &
  13. else
  14. kill -9 $idConky
  15. notify-send -i dialog-information "conky with id = $idConky was killed"
  16. # echo "conky with id = $idConky was killed"
  17. fi
  18. # cp ~/.config/xfce4/desktop/icons.screen0-1264x983_backup.rc ~/.config/xfce4/desktop/icons.screen0-1264x983.rc
  19. # sleep 2
  20. # xfdesktop --reload
  21. # if [ -z ${idConky} ]
  22. # then
  23. # {
  24. # # exec conky -c ~/.myScripts/conky/conkyrc2 2>&1 > /dev/null &
  25. # # #sleep 3
  26. # # exec conky -c ~/.myScripts/conky/conkyrc1 2>&1 > /dev/null &
  27. # # cp ~/.config/xfce4/desktop/icons.screen0-1350x698.rc ~/.config/xfce4/desktop/icons.screen0-1350x698.rc.bak
  28. # # sleep 3
  29. # # rm ~/.config/xfce4/desktop/*.rc
  30. # # cp ~/.config/xfce4/desktop/icons.screen0-1350x698.rc.bak ~/.config/xfce4/desktop/icons.screen0-1350x698.rc
  31. # sleep 10
  32. # conky -c ~/.myScripts/conky/conkyrc2 2>&1 > /dev/null &
  33. # cp ~/.config/xfce4/desktop/icons.screen0-1350x698.rc ~/.config/xfce4/desktop/icons.screen0-1350x721.rc
  34. # sleep 10
  35. # xfdesktop --reload
  36. # sleep 10
  37. # conky -c ~/.myScripts/conky/conkyrc1 2>&1 > /dev/null &
  38. # # xfdesktop --reload
  39. # }
  40. # else
  41. # {
  42. # kill -9 $idConky
  43. # echo "conky with id = $idConky was killed"
  44. # # killall conky
  45. # # cp ~/.config/xfce4/desktop/icons.screen0-1350x698.rc ~/.config/xfce4/desktop/icons.screen0-1350x698.rc.bak
  46. # # sleep 3
  47. # # rm ~/.config/xfce4/desktop/*.rc
  48. # # cp ~/.config/xfce4/desktop/icons.screen0-1350x698.rc.bak ~/.config/xfce4/desktop/icons.screen0-1350x698.rc
  49. # sleep 10
  50. # conky -c ~/.myScripts/conky/conkyrc2 2>&1 > /dev/null &
  51. # cp ~/.config/xfce4/desktop/icons.screen0-1350x698.rc ~/.config/xfce4/desktop/icons.screen0-1350x721.rc
  52. # sleep 10
  53. # xfdesktop --reload
  54. # sleep 10
  55. # conky -c ~/.myScripts/conky/conkyrc1 2>&1 > /dev/null &
  56. # # xfdesktop --reload
  57. # }
  58. # fi