removed 'os specific plugins' since they suck'
This commit is contained in:
parent
83e667740e
commit
0c7894e0a1
@ -1,28 +0,0 @@
|
||||
#!/bin/zsh
|
||||
|
||||
function DMENU__NEW_COMMAND() {
|
||||
local BIN="$HOME/.local/custom-dmenu";
|
||||
local HELP_STRING='\ncorrect syntax:\nDMENU__NEW_COMMAND [ name or "test" ] [ command .. args ]\n';
|
||||
|
||||
[[ "$1" == help ]] && {
|
||||
echo $HELP_STRING;
|
||||
return 0;
|
||||
}
|
||||
|
||||
[ ! -d $BIN ] && mkdir $BIN;
|
||||
|
||||
# fail if no command is provided
|
||||
[ ! $2 ] && return 1;
|
||||
|
||||
[[ "$1" != "test" ]] && {
|
||||
echo "${@:2}" > "$BIN/$1" 2>/dev/null \
|
||||
&& chmod +x "$BIN/$1" \
|
||||
&& echo "Command '$1' saved! ('${@:2}')" \
|
||||
|| { echo "Something went wrong :c \n"; echo "$HELP_STRING"; }
|
||||
} || {
|
||||
echo;
|
||||
echo -e "saved to : \e[32m$BIN/$1\e[0m";
|
||||
echo -e "executes : \e[31m${@:2}\e[0m";
|
||||
echo;
|
||||
}
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
#!/bin/zsh
|
||||
# Colors are organized into (Foreground)(Background) bits as seen below:
|
||||
# ========
|
||||
# 1 - Directory
|
||||
# 2 - Symbolic link
|
||||
# 3 - Socket
|
||||
# 4 - Pipe
|
||||
# 5 - Executable
|
||||
# 6 - Block special
|
||||
# 7 - Character special
|
||||
# 8 - Executable with setgid bit set
|
||||
# 9 - Executable with setgid bit set
|
||||
# 10- Directory writable to others, with sticky bit
|
||||
# 11- Directory writable to others, without sticky bit
|
||||
# ========
|
||||
# a black
|
||||
# b red
|
||||
# c green
|
||||
# d brown
|
||||
# e blue
|
||||
# f magenta
|
||||
# g cyan
|
||||
# h light grey
|
||||
# CAPITAL (BOLD)
|
||||
# x default
|
||||
|
||||
# actual colorscheme
|
||||
export LSCOLORS="ExxxxxDxBxxxxxxxxxxxxx"
|
||||
|
||||
# for OSX, fixes spacing issues
|
||||
f_notabs=0
|
||||
|
||||
# default ls to use defined colorscheme
|
||||
alias ls='ls -G'
|
||||
|
||||
|
@ -1,59 +0,0 @@
|
||||
#!/bin/zsh
|
||||
|
||||
function voicesed() { sed 's/\([^ ]*\) .*/\1/;'; }
|
||||
function voicelist() { say -v ? | voicesed; }
|
||||
function voicelistenglish() { say -v ? | grep 'en_' | voicesed; }
|
||||
function voicerandom() { voicelistenglish | shuf -n 1; }
|
||||
|
||||
function voicelistnormal() {
|
||||
voicelistenglish |
|
||||
sed '/Trinoids/d;/Zarvox/d;/Deranged/d;/Hysterical/d;/Bahh/d;/Bubbles/d'
|
||||
}
|
||||
function voicerandomnormal() { voicelistnormal | shuf -n 1; }
|
||||
|
||||
function sayvoices() {
|
||||
for voice in $(voicelist); do
|
||||
say -v "$voice" $(say -v ? | grep $voice | sed 's/[^#]*# //');
|
||||
done
|
||||
}
|
||||
|
||||
function sayone() {
|
||||
local voice=$(voicerandom);
|
||||
say -v "$voice" $(say -v ? | grep $voice | sed 's/[^#]*# //');
|
||||
}
|
||||
|
||||
|
||||
function meme {
|
||||
local DIRECTORY="$HOME/Pictures/jest";
|
||||
|
||||
[ ! -d $DIRECTORY ] && echo "No meme directory found :c";
|
||||
|
||||
echo;
|
||||
imgcat $DIRECTORY/$1
|
||||
echo;
|
||||
}
|
||||
_meme () { # autocompletion
|
||||
# Set
|
||||
local cur=${COMP_WORDS[COMP_CWORD]}
|
||||
COMPREPLY=( $(compgen -W "$(ls $HOME/Pictures/jest)" -- $cur) )
|
||||
}
|
||||
complete -F _meme meme;
|
||||
|
||||
function pika {
|
||||
local DIRECTORY="$HOME/Pictures/pika";
|
||||
|
||||
[ ! -d $DIRECTORY ] && echo "Pikachu directory required." && exit 1;
|
||||
|
||||
# count the pikas
|
||||
IMAGE_COUNT=$(ls -l $DIRECTORY | wc -l);
|
||||
let "IMAGE_COUNT=IMAGE_COUNT-1";
|
||||
|
||||
# pick a random gif from the pikachu directory
|
||||
IMAGE="$DIRECTORY/$((RANDOM % $IMAGE_COUNT)).gif";
|
||||
|
||||
echo;
|
||||
imgcat $IMAGE
|
||||
echo;
|
||||
}
|
||||
|
||||
alias pikabox='while true; do reset; pika; sleep 120; done'
|
@ -1,96 +0,0 @@
|
||||
#!/bin/zsh
|
||||
function osxtimer() {
|
||||
# dependency check
|
||||
#termdown --version >/dev/null 2>&1 || { echo osxtimer requires 'termdown'; exit 1; }
|
||||
#lolcat --version >/dev/null 2>&1 || lolcatError='`lolcat` is not installed';
|
||||
#figlet --version >/dev/null 2>&1 || figletError='`figlet` is not installed';
|
||||
|
||||
# set defaults
|
||||
local msg;
|
||||
local timestring='10s';
|
||||
local voice;
|
||||
local critical;
|
||||
local dontsaycountdown;
|
||||
local dontsaymessage;
|
||||
local dowait;
|
||||
local dontdisplaymessage;
|
||||
local displayHelp;
|
||||
|
||||
unset OPTIND;
|
||||
while getopts "MVTYhwm:t:c:v:" opt; do
|
||||
case $opt in
|
||||
m) msg=$OPTARG ;; # optional message
|
||||
M) dontdisplaymessage=t ;; # don't display message (but maybe say it)
|
||||
t) timestring=$OPTARG ;; # termdown countdown string
|
||||
c) critical=$OPTARG ;; # optional critical seconds remaining
|
||||
v) voice=$OPTARG ;; # optional voice for critical seconds remaining
|
||||
V) voice=$(voicerandom) ;; # select random voice
|
||||
T) dontsaycountdown=t; ;; # don't readout countdown
|
||||
V) dontsaymessage=t; ;; # don't readout message after countdown
|
||||
w) dowait=t; ;; # don't wait for user input after the timer
|
||||
h) displayHelp=t; ;; # display help message
|
||||
:) echo option -$OPTARG requires an argument; displayHelp=t;
|
||||
;;
|
||||
esac
|
||||
done
|
||||
unset OPTIND;
|
||||
|
||||
# exit on fail
|
||||
if [ $displayHelp ]; then
|
||||
printf "
|
||||
Correct usage:
|
||||
[-t]\t countdown amount as a timestring used in 'termdown'
|
||||
[-m]\t display message after countdown is finished
|
||||
[-c]\t critical seconds param for 'termdown'
|
||||
[-v]\t 'say' voice used for reading the message and countdown
|
||||
[-V]\t select random voice for message and timer readout
|
||||
[-T]\t used with -v or -V :: don't readout the countdown
|
||||
[-Y]\t used with -v or -V :: don't readout the message
|
||||
[-w]\t wait for user input after the timer
|
||||
\n";
|
||||
return 1;
|
||||
fi;
|
||||
|
||||
# verify that the voice exists
|
||||
say -v ? | grep $voice >/dev/null 2>&1 || unset voice;
|
||||
|
||||
local termdownargs="$timestring ";
|
||||
[[ $critical ]] && termdownargs="$termdownargs -c $critical";
|
||||
[[ $voice ]] && [ -z $dontsaycountdown ] && termdownargs="$termdownargs -v $voice";
|
||||
termdown $termdownargs;
|
||||
|
||||
[[ $msg ]] && [ -z $dontdisplaymessage ] && figlet "$msg" | lolcat;
|
||||
[[ $voice ]] && [ -z $dontsaymessage ] && say -v "$voice" "$msg";
|
||||
|
||||
[[ $dowait ]] && read -n 1; # wait for user input
|
||||
}
|
||||
|
||||
function rdexercise() {
|
||||
local message='Plank time!';
|
||||
local delay='1h30m';
|
||||
local count;
|
||||
|
||||
# flagged arguments
|
||||
unset OPTIND;
|
||||
while getopts "m:t:c:" opt; do
|
||||
case $opt in
|
||||
m) message=$OPTARG ;; # optional message
|
||||
t) timeout=$OPTARG ;; # termdown countdown string
|
||||
c) count=$OPTARG ;; # length of exercise as a timestring
|
||||
esac
|
||||
done
|
||||
unset OPTIND;
|
||||
|
||||
# operation loop
|
||||
while true; do
|
||||
rdstart >/dev/null 2>&1;
|
||||
clear; osxtimer -VT -m "$message" -t "$delay";
|
||||
rdplank >/dev/null 2>&1;
|
||||
|
||||
read -n 1; clear;
|
||||
[[ $count ]] && osxtimer -c 10 -m "Done" -v "$(voicerandomnormal)" -t "$count";
|
||||
done
|
||||
}
|
||||
|
||||
alias planktimer='rdexercise -c';
|
||||
alias pushuptimer='rdexercise -m "Push-up time!" -t "1h" -c';
|
Loading…
Reference in New Issue
Block a user