on-off_conky.sh 568 B

1234567891011121314151617181920
  1. #!/bin/sh
  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. if [ -z ${idConky} ]
  6. then
  7. {
  8. # exec conky -c ~/.myScripts/conky/conkyrc2 2>&1 > /dev/null &
  9. #sleep 3
  10. exec conky -c ~/.myScripts/conky/conkyrc1 2>&1 > /dev/null &
  11. }
  12. else
  13. {
  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. }
  18. fi