autoConky_last_HP.sh 2.3 KB

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