Created
September 13, 2019 17:45
-
-
Save stanographer/8f442176afb0764bdf9c999d1e25bb87 to your computer and use it in GitHub Desktop.
Automatically pulls down your most dictionaries into your dictionary directory, and then starts Plover. Name this .plo.sh and add to in home directory, add "source ~/.plo.sh" to your bash or zsh profile and it lets you start Plover with the command "plo" from anywhere. Note: must be using dev-environment build.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 #!/bin/zsh | |
2 | |
3 # Color variables. | |
4 red=$'\e[1;31m' | |
5 grn=$'\e[1;32m' | |
6 blu=$'\e[1;34m' | |
7 mag=$'\e[1;35m' | |
8 cyn=$'\e[1;36m' | |
9 white=$'\e[0m' | |
10 yellow=$'\e[1;33m' | |
11 | |
12 # Automatically pull down most-recent dictionaries. | |
13 function pull_dictionaries() { | |
14 case "$(curl -s --max-time 2 -I http://google.com | sed 's/^[^ ]* *\([0-9]\).*/\1/; 1q')" in | |
15 [23]) echo -e $mag "\n📚Attempting to update your steno dictionaries!" $white && echo -e $yellow "\nPulling from GitH ub." && cd ~/Dictionaries && git pull;; | |
16 5) echo -e $red "📡 No Internet connectivity. Dictionaries were not updated. ❌\n $white";; | |
17 *) echo -e $yellow "📡The network is down or very slow. Please be patient! ⚠️\n" $white;; | |
18 esac | |
19 } | |
20 | |
21 # Run Plover. | |
22 function plo() { | |
23 pull_dictionaries | |
# Or wherever your Plover installation resides. | |
24 cd ~/plover | |
25 echo -e $grn "\n🐦Launching Plover...\n" $cyn | |
26 ./launch.sh | |
27 } | |
~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment