Make zsh task and timew prompts optional
This commit is contained in:
parent
34e4b590ca
commit
5064075721
1 changed files with 15 additions and 5 deletions
10
zshrc
10
zshrc
|
@ -18,18 +18,28 @@ setopt hist_ignore_space
|
||||||
|
|
||||||
bindkey -v
|
bindkey -v
|
||||||
|
|
||||||
|
which task > /dev/null && which jq > /dev/null
|
||||||
|
run_task_prompt=$?
|
||||||
task_prompt() {
|
task_prompt() {
|
||||||
|
if [ -z $run_task_prompt ]
|
||||||
|
then
|
||||||
tasks="$(task +ACTIVE export | jq -r '.[].description' | sed 's/^/‣ /')"
|
tasks="$(task +ACTIVE export | jq -r '.[].description' | sed 's/^/‣ /')"
|
||||||
if [ -n "$tasks" ]
|
if [ -n "$tasks" ]
|
||||||
then
|
then
|
||||||
echo "\x1b[30m$tasks\n\x1b[0m"
|
echo "\x1b[30m$tasks\n\x1b[0m"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
which timew > /dev/null
|
||||||
|
run_timew_prompt=$?
|
||||||
timew_prompt() {
|
timew_prompt() {
|
||||||
|
if [ -z $run_timew_prompt ]
|
||||||
|
then
|
||||||
if [ $(timew get dom.active) -eq "1" ]
|
if [ $(timew get dom.active) -eq "1" ]
|
||||||
then echo '\x1b[31m●\x1b[0m '
|
then echo '\x1b[31m●\x1b[0m '
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
ranger_prompt() {
|
ranger_prompt() {
|
||||||
|
|
Loading…
Reference in a new issue