dm-GoogleDrive.sh 968 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/usr/bin/env bash
  2. DMENU="dmenu -i -l 10 -nf ${nf} -nb ${nb} -sf ${sf} -sb ${sb} -fn ${fn} -p"
  3. declare options=(
  4. "2017aaa - $HOME/.myScripts/mountUnmountGoogleDrive_2017aaa.sh"
  5. "alkos - $HOME/.myScripts/mountUnmountGoogleDrive_alkos.sh"
  6. "auto - $HOME/.myScripts/mountUnmountGoogleDrive_auto.sh"
  7. "quit")
  8. # Colors:
  9. # Materia Manjaro
  10. nf='#09dbc9'
  11. nb='#222b2e'
  12. sf='#dbdcd5'
  13. sb='#009185'
  14. fn='Ubuntu-16:normal'
  15. # Gruvbox
  16. # nf='#fea63c'
  17. # nb='#282828'
  18. # # sf='#dbdcd5'
  19. # sb='#d79921'
  20. # fn='Sarasa Mono SC Nerd-17:normal'
  21. choice=$(printf '%s\n' "${options[@]}" | dmenu -i -l 10 -nf ${nf} -nb ${nb} -sf ${sf} -sb ${sb} -fn ${fn} -p 'Mount/Unmount:')
  22. # choice=$(printf '%s\n' "${options[@]}" | ${DMENU} 'Mount/Unmount:')
  23. if [[ "$choice" == "quit" ]]; then
  24. echo "Program terminated." && exit 1
  25. elif [[ "$choice" ]]; then
  26. drive=$(printf '%s\n' "${choice}" | awk '{print $NF}')
  27. # $drive
  28. terminator -e "$drive"
  29. else
  30. echo "Program terminated." && exit 1
  31. fi