diff --git a/android/android.plugin.zsh b/android/android.plugin.zsh new file mode 100644 index 0000000..7237249 --- /dev/null +++ b/android/android.plugin.zsh @@ -0,0 +1 @@ +alias android-studio="open -a /Users/owenlejeune/Applications/JetBrains\ Toolbox/Android\ Studio.app" diff --git a/apps/apps.plugin.zsh b/apps/apps.plugin.zsh new file mode 100644 index 0000000..40b3612 --- /dev/null +++ b/apps/apps.plugin.zsh @@ -0,0 +1,3 @@ +VNC_VIEWER="VNC\ Viewer" + +alias vnc_viewer="open -a $VNC_VIEWER" diff --git a/homebrew/homebrew.plugin.zsh b/homebrew/homebrew.plugin.zsh index 558ed2c..882cb1e 100644 --- a/homebrew/homebrew.plugin.zsh +++ b/homebrew/homebrew.plugin.zsh @@ -1 +1,10 @@ -alias brewup="brew update && brew upgrade && brew cleanup && brew doctor && brew cask upgrade" +function brewup() { + echo "***BREW UPDATE***" + brew update + echo "***BREW UPGRADE***" + brew upgrade + echo "***BREW CLEANUP***" + brew cleanup + echo "***BREW DOCTOR***" + brew doctor +} diff --git a/scripts/frand.py b/scripts/frand.py new file mode 100644 index 0000000..1511366 --- /dev/null +++ b/scripts/frand.py @@ -0,0 +1,10 @@ +import os, os.path +import sys +from random import randint + +dirn = sys.argv[1] +dirlist = os.listdir(dirn) +numitems = len(dirlist) +i = randint(0,numitems-1) +print(dirlist[i]) + diff --git a/scripts/randomnums.py b/scripts/randomnums.py new file mode 100644 index 0000000..b47bc1b --- /dev/null +++ b/scripts/randomnums.py @@ -0,0 +1,24 @@ +from random import randrange +import sys + +#num = int(input("Enter a number: ")) +#num2 = int(input("How many numbers: ")) + +args = len(sys.argv) +if args<3 or args>4: + print("Invalid command\n usage: randnums []") + quit() + +nmin = int(sys.argv[1]) +nmax = int(sys.argv[2]) +nnum = 1 if args==3 else int(sys.argv[3]) + +if nmin>=nmax: + print("Error: min must be less than max") + quit() +if nnum <= 0: + print("Error: num must be greater than 0") + quit() + +for x in range(0, nnum): + print(randrange(nmin, nmax)) diff --git a/scripts/scripts.plugin.zsh b/scripts/scripts.plugin.zsh new file mode 100644 index 0000000..296a263 --- /dev/null +++ b/scripts/scripts.plugin.zsh @@ -0,0 +1,4 @@ +SDIR="~/.oh-my-zsh/custom/plugins/scripts" + +alias frand="python3 ${SDIR}/frand.py" +alias randnums="python3 ${SDIR}/randomnums.py"