dm-mountUnmountWinDisks.sh 925 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/usr/bin/env bash
  2. declare options=(
  3. "mount C - $HOME/.myScripts/winC_mount.sh"
  4. "mount D - $HOME/.myScripts/winD_mount.sh"
  5. "unmount C - $HOME/.myScripts/winC_unmount.sh"
  6. "unmount D - $HOME/.myScripts/winD_unmount.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. DMENU="dmenu -i -l 10 -nf ${nf} -nb ${nb} -sf ${sf} -sb ${sb} -fn ${fn} -p"
  22. choice=$(printf '%s\n' "${options[@]}" | ${DMENU} 'Windows:')
  23. # choice=$(printf '%s\n' "${options[@]}" | dmenu -i -l 10 -nf ${nf} -nb ${nb} -sf ${sf} -sb ${sb} -fn ${fn} -p 'Windows:')
  24. if [[ "$choice" == "quit" ]]; then
  25. echo "Program terminated." && exit 1
  26. elif [[ "$choice" ]]; then
  27. drive=$(printf '%s\n' "${choice}" | awk '{print $NF}')
  28. $drive
  29. else
  30. echo "Program terminated." && exit 1
  31. fi