1
1
mirror of https://github.com/rywng/dotfiles.git synced 2024-11-24 11:51:50 +08:00

Update lf and ncmpcpp

lf: added custom open method
.zshrc: added fuck implementation and caching
ncmpcpp: change tab behaviour
This commit is contained in:
juan 2021-08-18 14:04:17 +08:00
parent 02993dfbfc
commit d51563c8f9
3 changed files with 25 additions and 9 deletions

View File

@ -5,11 +5,21 @@ set drawbox true
set icons true
set ignorecase true
set info size
# set previewer ~/.config/lf/preview.sh
# set preview true
map D push %rm<space>-rf<space>$fs
map a push %mkdir<space>
map x $$f
# xdg-open
cmd open ${{
case $(file --mime-type "$f" -bL) in
text/*|application/json) $EDITOR "$f";;
*) xdg-open "$f" ;;
esac
}}
# bulk-rename
cmd bulk-rename ${{
old="$(mktemp)"

View File

@ -366,7 +366,7 @@ space_add_mode = add_remove
## media_library, playlist_editor, tag_editor, outputs, visualizer, clock,
## lyrics, last_fm.
##
screen_switcher_mode = playlist, media_library, playlist_editor, visualizer, help
screen_switcher_mode = previous
#
##
## Note: You can define startup screen by choosing screen from the list above.

22
.zshrc
View File

@ -62,6 +62,20 @@ autoload edit-command-line
zle -N edit-command-line
bindkey '' edit-command-line
#TheFuck plugin
fuck_cache="$HOME/.cache/thefuck"
test -f $fuck_cache || thefuck --alias uwu >| "$fuck_cache"
source "$fuck_cache"
unset fuck_cache
#source fasd_cache for 40 ms quicker start.
fasd_cache="$HOME/.cache/fasd_cache"
if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then
fasd --init zsh-hook zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcomp-install posix-alias posix-hook >| "$fasd_cache"
fi
source "$fasd_cache"
unset fasd_cache
#use lf to change dirs. credit: luke
lfcd () {
tmp="$(mktemp)"
@ -111,14 +125,6 @@ export PATH="${PATH}:${HOME}/.scripts/"
export USE_CCACHE=1
export PATH="/usr/lib/ccache/bin${PATH:+:}$PATH"
#source fasd_cache for 40 ms quicker start.
fasd_cache="$HOME/.cache/fasd_cache"
if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then
fasd --init zsh-hook zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcomp-install posix-alias posix-hook >| "$fasd_cache"
fi
source "$fasd_cache"
unset fasd_cache
alias b='bat'
alias btctl='bluetoothctl'
alias cp='cp -iv'