cleanup and fixes for config in home dir
This commit is contained in:
parent
57fa0afede
commit
6023ed42bf
13 changed files with 66 additions and 344 deletions
|
@ -7,14 +7,13 @@
|
|||
# Lets you load custom functions and zle widgets split into single files.
|
||||
#
|
||||
# zle widgets are stored in the "widgets" folder in your configuration directory
|
||||
# (default: /etc/zsh, if you want to use this in a user configuration file, set
|
||||
# the variable $zcpath to your zsh configuration directory)
|
||||
# (set with $ZDOTDIR, see manpage. defaults to /etc/zsh)
|
||||
#
|
||||
# functions are stored in the "functions" folder analogous.
|
||||
#
|
||||
|
||||
ZWIDGETPATH=${ZWIDGETPATH:-"${zcpath:-/etc/zsh}/widgets"}
|
||||
ZFUNCTIONPATH=${ZFUNCTIONPATH:-"${zcpath:-/etc/zsh}/functions"}
|
||||
ZWIDGETPATH=${ZWIDGETPATH:-"${ZDOTDIR:-/etc/zsh}/widgets"}
|
||||
ZFUNCTIONPATH=${ZFUNCTIONPATH:-"${ZDOTDIR:-/etc/zsh}/functions"}
|
||||
fpath+=( "${ZWIDGETPATH}" )
|
||||
fpath+=( "${ZFUNCTIONPATH}" )
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#
|
||||
# Modules are stored in the "modules" folder in your configuration directory
|
||||
# (default: /etc/zsh, if you want to use this in a user configuration file, set
|
||||
# the variable $zcpath to your zsh configuration directory)
|
||||
# the variable $ZDOTDIR to your zsh configuration directory in ~/.zshenv)
|
||||
#
|
||||
# Each module should have a file called "init". This file is sourced, when the
|
||||
# module is loaded and is responsible for sourcing any other files needed by the
|
||||
|
@ -21,7 +21,7 @@
|
|||
#################################
|
||||
|
||||
# Path to module directory
|
||||
ZMODPATH=${ZMODPATH:-"${zcpath:-/etc/zsh}/modules"}
|
||||
ZMODPATH=${ZMODPATH:-"${ZDOTDIR:-/etc/zsh}/modules"}
|
||||
. $ZMODPATH/helpers.zsh
|
||||
errdetails=""
|
||||
|
||||
|
@ -100,7 +100,8 @@ mod_check_dep() {
|
|||
if ! mod_queue "$dep" is_dep ${modpath}; then
|
||||
errdetails="$dep"
|
||||
return 1;
|
||||
fi;;
|
||||
fi
|
||||
;;
|
||||
"after")
|
||||
if [ -z "$ZMODLOAD_ONLY" ] \
|
||||
|| in_array "$dep" "${(@)ZMODLOAD_ONLY}"; then
|
||||
|
|
|
@ -61,8 +61,8 @@ function prompt_preexec {
|
|||
# if running gnu screen, set the window name to the last run command
|
||||
# FIXME any way to make this not change certain window titles (by window
|
||||
# number or if a title isn't already set?)
|
||||
if [[ "$TERM" =~ "screen" ]] \
|
||||
&& [[ "$(tmux show -w au)" != "automatic-rename off" ]]; then
|
||||
if [[ -n "$TMUX" ]] \
|
||||
&& ! tmux show -w | grep -q "automatic-rename off"; then
|
||||
local CMD=${1[(wr)^(*=*|ssh|sudo|-*)]}
|
||||
echo -ne "\ek$CMD\e\\"
|
||||
fi
|
||||
|
@ -73,6 +73,8 @@ if mod_loaded todo; then
|
|||
count=$(todo_count all ${TO_READ_FILE:-$HOME/.to_read})
|
||||
if [ "$count" -gt 1 ]; then
|
||||
echo -n "${PVPREFIX}${pathcolor}To read: $((count -1)) ${rpscolor}${PVSUFFIX}"
|
||||
elif [ "$count" -lt 0 ]; then
|
||||
echo -n "${PVPREFIX}${pathcolor}no todo${rpscolor}${PVSUFFIX}"
|
||||
fi
|
||||
}
|
||||
fi
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
#!/bin/zsh
|
||||
|
||||
todo_count() {
|
||||
if [ -n "$2" ]; then
|
||||
file="--database $2"
|
||||
else
|
||||
file="-G"
|
||||
fi
|
||||
todo ${=file} -f +${1:-high} | wc -l
|
||||
}
|
||||
if command -v todo >/dev/null; then
|
||||
todo_count() {
|
||||
if [ -n "$2" ]; then
|
||||
file="--database $2"
|
||||
else
|
||||
file="-G"
|
||||
fi
|
||||
todo ${=file} -f +${1:-high} | wc -l
|
||||
}
|
||||
else
|
||||
todo_count() {
|
||||
echo -1
|
||||
}
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue