Guest User

Untitled

a guest
Aug 22nd, 2021
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.48 KB | None | 0 0
  1. #!/bin/bash
  2. run_kons() {
  3. konsole --hold \
  4.         --geometry 1200x900+0+0 \
  5.         -e /bin/bash -c "$*;$SHELL"
  6. }
  7. choice=$(kdialog --title "Windscribe" --geometry 360x300+300+300  \
  8.              --separate-output  \
  9.              --checklist "Connect options:" \
  10.                  1 "GB Custard"     off \
  11.                  2 "GB Crumpets"    off \
  12.                  3 "ES BCN"         off \
  13.                  4 "ES Mad"         off \
  14.                  5 "NL Tulip"       off \
  15.                  6 "List locations" off \
  16.                  7 "Disconnect"     off \
  17.                  8 Exit             off)
  18. case $choice in
  19. 1) bash -c "windscribe connect Custard" ; echo Cust > /home/not/.local/bin/conn.txt ; kdialog --msgbox "Conected to GB Custard" ; $0     ;;
  20. 2) bash -c "windscribe connect Crumpets" ; echo Crum > /home/not/.local/bin/conn.txt ; kdialog --msgbox "Conected to GB Crumpets" ; $0   ;;
  21. 3) bash -c "windscribe connect Batllo" ; echo BCN > /home/not/.local/bin/conn.txt ; kdialog --msgbox "Conected to ES BCN" ; $0           ;;
  22. 4) bash -c "windscribe connect Prado" ; echo MAD > /home/not/.local/bin/conn.txt ; kdialog --msgbox "Conected to ES Madrid" ; $0         ;;
  23. 5) bash -c "windscribe connect Tulip" ; echo Tul > /home/not/.local/bin/conn.txt ; kdialog --msgbox "Conected to NL Tulip" ; $0          ;;
  24. 6) run_kons "windscribe locations" ; $0  ;;
  25. 7) bash -c "windscribe disconnect" ; echo Local > /home/not/.local/bin/conn.txt ; kdialog --msgbox "Disconnected" ; $0 ;;
  26. 8) exit
  27. esac
  28.  
Advertisement
Add Comment
Please, Sign In to add comment