-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_zshrc
110 lines (94 loc) · 2.98 KB
/
dot_zshrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
setopt extendedglob
bindkey -e
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/marka/.zshrc'
autoload -Uz compinit
compinit
# End of lines added by compinstall
bindkey "^[[1;5C" forward-word #right arrow
bindkey "^[[1;5D" backward-word #left arrow
bindkey "^[[H" beginning-of-line #home
bindkey "^[OH" beginning-of-line #home
bindkey "^[OF" end-of-line #end
bindkey "^[[F" end-of-line #end
bindkey "^[[3~" delete-char #delete
#tmux-specific bindings
bindkey "^[[1~" beginning-of-line #home
bindkey "^[[4~" end-of-line #end
bindkey "^[[3;5~" delete-word
#custom aliases
alias nnn="nnn -Hx"
alias mv="mv --backup=numbered"
alias xargs="xargs "
alias tag="tmsu tag \"$nnn\""
#sources
source $(echo "$HOME/.config/broot/launcher/bash/br" | envsubst)
source /usr/share/fzf/completions/completion.zsh
#fzf custom completions
_fzf_complete_tags() {
_fzf_complete --multi --reverse --prompt="tags> " -- "$@" < <(
cd /run/media/mara/Earth/Backups/Android/.Nandroid_Backups/Tagged\ Collection/files/
while read line; do
echo "$line"
done < <(tmsu tags)
)
}
_fzf_complete_values() {
_fzf_complete --multi --reverse --prompt="values> " -- "$@" < <(
cd /run/media/mara/Earth/Backups/Android/.Nandroid_Backups/Tagged\ Collection/files/
while read line; do
echo "$line"
done < <(tmsu values)
)
}
_fzf_complete_artist() {
_fzf_complete --multi --reverse --prompt="artist> " -- "$@" < <(
cd /run/media/mara/Earth/Backups/Android/.Nandroid_Backups/Tagged\ Collection/files/
while read line; do
echo "$line"
done < <(tmsu values artist)
)
}
_fzf_complete_character() {
_fzf_complete --multi --reverse --prompt="character> " -- "$@" < <(
cd /run/media/mara/Earth/Backups/Android/.Nandroid_Backups/Tagged\ Collection/files/
while read line; do
echo "$line"
done < <(tmsu values character)
)
}
_fzf_complete_person() {
_fzf_complete --multi --reverse --prompt="person> " -- "$@" < <(
cd /run/media/mara/Earth/Backups/Android/.Nandroid_Backups/Tagged\ Collection/files/
while read line; do
echo "$line"
done < <(tmsu values person)
)
}
_fzf_complete_sequence() {
_fzf_complete --multi --reverse --prompt="sequence> " -- "$@" < <(
cd /run/media/mara/Earth/Backups/Android/.Nandroid_Backups/Tagged\ Collection/files/
while read line; do
echo "$line"
done < <(tmsu values sequence)
)
}
function count-of-tmsu-tags-by-artist() {
for item in $(tmsu values -1 artist); do
echo "$item";
tmsu files artist="$item" -c;
done \
| xargs -n 2 \
| sed "s| |,|" \
| sort -nrt, -k2
}
eval "$(atuin init zsh)"
# added for npm-completion https://github.com/Jephuff/npm-bash-completion
PATH_TO_NPM_COMPLETION="/usr/local/bin/../lib/node_modules/npm-completion"
source $PATH_TO_NPM_COMPLETION/npm-completion.sh
PATH_TO_NPM_COMPLETION="/home/mara/.nvm/versions/node/v21.0.0/lib/node_modules/npm-completion"