forked from colonelpanic/dotfiles
Delete more unused dots
This commit is contained in:
parent
76547a5a20
commit
ff5a72a6a4
@ -1,3 +0,0 @@
|
|||||||
for filename in ~/.lib/bash/*; do
|
|
||||||
source $filename
|
|
||||||
done
|
|
@ -1,68 +0,0 @@
|
|||||||
#compdef inv invoke
|
|
||||||
|
|
||||||
typeset -A opt_args
|
|
||||||
local context state line
|
|
||||||
|
|
||||||
function _invoke_subcommands {
|
|
||||||
LISTINGS=( $(invoke -l | tail -n+2 | sed 's/^ *//g' | while read line ; do _remove_docstrings "$line"; done;) )
|
|
||||||
for subcommand_listing in $LISTINGS
|
|
||||||
do
|
|
||||||
local comma_separated="$(echo $subcommand_listing | tr -d ')\n' | tr '(' ',')"
|
|
||||||
local names="$(_echo_split $comma_separated ',')"
|
|
||||||
echo $names | tr '\n' ' '
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
function _remove_docstrings {
|
|
||||||
local delimiter_character=' '
|
|
||||||
if echo $1 | grep ')' > /dev/null
|
|
||||||
then
|
|
||||||
delimiter_character=')'
|
|
||||||
fi
|
|
||||||
echo $1 | cut -d "$delimiter_character" -f 1
|
|
||||||
}
|
|
||||||
|
|
||||||
function _echo_split {
|
|
||||||
local IFS
|
|
||||||
IFS="$2" read -rA -- arr <<EOF
|
|
||||||
$1
|
|
||||||
EOF
|
|
||||||
echo "${arr[@]}"
|
|
||||||
}
|
|
||||||
|
|
||||||
function _complete_invoke_subcommand {
|
|
||||||
local cache_policy cache_name _invoke_subcommands
|
|
||||||
cache_name=invoke/subcommands"$(pwd)"
|
|
||||||
zstyle -s ":completion:${curcontext}:" cache-policy cache_policy
|
|
||||||
|
|
||||||
if [[ -z "$cache_policy" ]]; then
|
|
||||||
zstyle ":completion:${curcontext}:" cache-policy _invoke_subcommands_caching_policy
|
|
||||||
fi
|
|
||||||
|
|
||||||
if _cache_invalid "$cache_name" || ! _retrieve_cache "$cache_name"; then
|
|
||||||
_invoke_subcommands=( $(_invoke_subcommands) )
|
|
||||||
_store_cache "$cache_name" _invoke_subcommands
|
|
||||||
fi
|
|
||||||
|
|
||||||
local expl
|
|
||||||
_wanted invoke_subcommands expl 'invoke subcommands' compadd -a _invoke_subcommands
|
|
||||||
}
|
|
||||||
|
|
||||||
function _invoke_subcommands_caching_policy {
|
|
||||||
local -a oldp
|
|
||||||
oldp=( "$1"(Nmm+1) ) # 1 minute
|
|
||||||
(( $#oldp ))
|
|
||||||
}
|
|
||||||
|
|
||||||
_arguments -s -S \
|
|
||||||
"--no-dedupe[Disable task deduplication.]" \
|
|
||||||
"(-c --collection)"{-c,--collection}"[Specify collection name to load. May be given >1 time.]" \
|
|
||||||
"(-e --echo)"{-e,--echo}"[Echo executed commands before running.]" \
|
|
||||||
"(-h --help)"{-h,--help}"[Show core or per-task help and exit.]:command:_invoke_subcommand" \
|
|
||||||
"(-H --hide)"{-H,--hide}"[Set default value of run()'s 'hide' kwarg.]:command:_invoke_subcommand" \
|
|
||||||
"(-l --list)"{-l,--list}"[List available tasks.]" \
|
|
||||||
"(-p --pty)"{-p,--pty}"[Use a pty when executing shell commands.]" \
|
|
||||||
"(-r --root)"{-r,--root}"[Change root directory used for finding task modules.]:directory:_directories" \
|
|
||||||
"(-V --version)"{-V,--version}"[Show version and exit.]:" \
|
|
||||||
"(-w --warn-only)"{-w,--warn-only}"[Warn, instead of failing, when shell commands fail.]" \
|
|
||||||
"*:invoke command:_complete_invoke_subcommand"
|
|
@ -1,73 +0,0 @@
|
|||||||
#compdef testify
|
|
||||||
|
|
||||||
_testify() {
|
|
||||||
typeset -A opt_args
|
|
||||||
local context state line
|
|
||||||
|
|
||||||
BASE_TEST_PATH='yelp.tests'
|
|
||||||
_arguments "1:testify_file:->file" "2:testify_:->test_case"
|
|
||||||
|
|
||||||
case $state in
|
|
||||||
(file)
|
|
||||||
_find_test_files
|
|
||||||
;;
|
|
||||||
(test_case)
|
|
||||||
_find_test_methods
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
(( $+functions[_print_test_methods] )) ||
|
|
||||||
_print_test_methods() {
|
|
||||||
python - "$@" <<ENDPYTHON
|
|
||||||
import sys
|
|
||||||
from testify import test_discovery
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
for test_case in test_discovery.discover(sys.argv[1]):
|
|
||||||
print test_case.__name__
|
|
||||||
for member in dir(test_case):
|
|
||||||
if member.startswith("test"):
|
|
||||||
print "%s.%s" % (test_case.__name__, member)
|
|
||||||
ENDPYTHON
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
(( $+functions[_find_test_methods] )) ||
|
|
||||||
_find_test_methods() {
|
|
||||||
TEST_COMPLETIONS=( `_print_test_methods $line 2> /dev/null` )
|
|
||||||
for COMPLETION in $TEST_COMPLETIONS
|
|
||||||
do
|
|
||||||
compadd $COMPLETION
|
|
||||||
done
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
(( $+functions[_find_test_files] )) ||
|
|
||||||
_find_test_files() {
|
|
||||||
local SEARCH_PATH
|
|
||||||
if [[ "$PREFIX" == "$BASE_TEST_PATH"* ]]
|
|
||||||
then
|
|
||||||
SEARCH_PATH="${PREFIX%.*}"
|
|
||||||
else
|
|
||||||
compadd $BASE_TEST_PATH
|
|
||||||
compadd $BASE_TEST_PATH'.'
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
SEARCH_PATH=$(echo "$SEARCH_PATH" | tr . /)
|
|
||||||
DIRECTORIES=( "$SEARCH_PATH"/*(/) )
|
|
||||||
PY_FILES=( "$SEARCH_PATH"/*.py )
|
|
||||||
for DIRECTORY in $DIRECTORIES
|
|
||||||
do
|
|
||||||
compadd `echo "${DIRECTORY}" | tr / .`
|
|
||||||
compadd `echo "${DIRECTORY}" | tr / .`'.'
|
|
||||||
done
|
|
||||||
|
|
||||||
for PY_FILE in $PY_FILES
|
|
||||||
do
|
|
||||||
compadd `echo "${PY_FILE%.py}" | tr / .`
|
|
||||||
done
|
|
||||||
return 0
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
#!/usr/bin/env zsh
|
|
||||||
refresh_config
|
|
||||||
mu4e_sync_command
|
|
@ -1,4 +0,0 @@
|
|||||||
source "$HOME/.lib/shellpath.sh"
|
|
||||||
|
|
||||||
command_exists python && setup_unless_environment_variable_exists NIX_PATH_SETUP_DONE _setup_path
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 164 KiB |
Binary file not shown.
Before Width: | Height: | Size: 28 KiB |
Binary file not shown.
Before Width: | Height: | Size: 83 KiB |
Binary file not shown.
Before Width: | Height: | Size: 144 KiB |
@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"keepassxc": "",
|
|
||||||
"Emacs": "",
|
|
||||||
"Chrome": "",
|
|
||||||
"Spotify": "",
|
|
||||||
"Hangouts": "",
|
|
||||||
"Firefox": "",
|
|
||||||
"URxvt": "",
|
|
||||||
"Steam": "",
|
|
||||||
"Transmission": "",
|
|
||||||
"Vlc": ""
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
WALLPAPER_DIR="$HOME/Pictures/wallpaper/"
|
|
||||||
|
|
||||||
random_paper() {
|
|
||||||
find "$WALLPAPER_DIR"use -type f -or -type l | shuf -n1
|
|
||||||
}
|
|
||||||
|
|
||||||
wallpaper() {
|
|
||||||
local target_paper=${1:-"$(random_paper)"}
|
|
||||||
feh --bg-center $target_paper --bg-center $target_paper
|
|
||||||
}
|
|
||||||
|
|
||||||
wallpaper_timer() {
|
|
||||||
while true; do
|
|
||||||
sleep 10m
|
|
||||||
done
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user