Compare commits

...

3 Commits

Author SHA1 Message Date
Talia 9561777fb7 Fix zsh prompt shenanigans 2023-09-25 14:00:41 +02:00
Talia c4c8ce5eba Fix taskwarrior prompt integration never showing 2023-09-13 09:26:08 +02:00
Talia c3b5d1b524 Make find-edit case insensitive 2023-09-12 11:49:12 +02:00
2 changed files with 6 additions and 6 deletions

View File

@ -17,7 +17,7 @@ if [ -f "$1" ]
then
$EDITOR $1
else
file=$(sh -c "find $root $ignore -type f" | fzf -m -1 -q "$*")
file=$(sh -c "find $root $ignore -type f" | fzf -i -m -1 -q "$*")
if [ "$?" -eq 0 ]
then
echo "$file" | xargs -d '\n' $EDITOR

10
zshrc
View File

@ -21,12 +21,12 @@ bindkey -v
which task > /dev/null && which jq > /dev/null
run_task_prompt=$?
task_prompt() {
if [ -z $run_task_prompt ]
if [ $run_task_prompt -eq 0 ]
then
tasks="$(task +ACTIVE export | jq -r '.[].description' | sed 's/^/‣ /')"
if [ -n "$tasks" ]
then
echo "\x1b[30m$tasks\n\x1b[0m"
echo "%F{black}$tasks\n%{%}"
fi
fi
}
@ -34,10 +34,10 @@ task_prompt() {
which timew > /dev/null
run_timew_prompt=$?
timew_prompt() {
if [ -z $run_timew_prompt ]
if [ $run_timew_prompt -eq 0 ]
then
if [ $(timew get dom.active) -eq "1" ]
then echo '\x1b[31m●\x1b[0m '
then echo '%F{red}● '
fi
fi
}
@ -52,7 +52,7 @@ ranger_prompt() {
}
prompt='$(task_prompt)%(?.%F{green}.%F{red})λ%F{blue}$(ranger_prompt)%f '
export PROMPT_full='%F{red}$(timew_prompt)%B%F{magenta}%n%F{blue}@%F{magenta}%m%b %F{magenta}%~
export PROMPT_full='$(timew_prompt)%B%F{magenta}%n%F{blue}@%F{magenta}%m%b %F{magenta}%~
'"$prompt"
export PROMPT_gitlong='%F{red}$(timew_prompt)$(gitprompt && echo -ne " ")%F$(git log --oneline --no-decorate -1 2>/dev/null)
%F{cyan}$(gitpath)'"$prompt"