mirror of
https://github.com/rywng/dotfiles.git
synced 2024-11-24 11:51:50 +08:00
Compare commits
No commits in common. "42883ee0679ec7688ad76598f1ecfd9091e46245" and "1143f1f51441cf30e7b97fc28644ca774c67d6d9" have entirely different histories.
42883ee067
...
1143f1f514
69
.config/lf/lfrc
Normal file
69
.config/lf/lfrc
Normal file
@ -0,0 +1,69 @@
|
||||
set shell sh
|
||||
set ifs "\n"
|
||||
set hidden true
|
||||
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)"
|
||||
new="$(mktemp)"
|
||||
[ -n "$fs" ] && fs="$(ls)"
|
||||
printf '%s\n' "$fs" >"$old"
|
||||
printf '%s\n' "$fs" >"$new"
|
||||
$EDITOR "$new"
|
||||
[ "$(wc -l "$new")" -ne "$(wc -l "$old")" ] && exit
|
||||
paste "$old" "$new" | while IFS= read -r names; do
|
||||
src="$(printf '%s' "$names" | cut -f1)"
|
||||
dst="$(printf '%s' "$names" | cut -f2)"
|
||||
if [ "$src" = "$dst" ] || [ -e "$dst" ]; then
|
||||
continue
|
||||
fi
|
||||
mv -- "$src" "$dst"
|
||||
done
|
||||
rm -- "$old" "$new"
|
||||
lf -remote "send $id unselect"
|
||||
}}
|
||||
|
||||
# new folder
|
||||
cmd newfold ${{
|
||||
set -f
|
||||
read newd
|
||||
mkdir -- "$newd"
|
||||
mv -- $fx "$newd"
|
||||
}}
|
||||
|
||||
#save file name selected
|
||||
cmd savesel ${{
|
||||
echo $fs > args-selected-`pwgen -1`.txt
|
||||
}}
|
||||
|
||||
cmd extract ${{
|
||||
set -f
|
||||
case $f in
|
||||
*.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf $f;;
|
||||
*.tar.gz|*.tgz) tar xzvf $f;;
|
||||
*.tar.xz|*.txz) tar xJvf $f;;
|
||||
*.zip) unzip $f;;
|
||||
*.rar) unrar x $f;;
|
||||
*.7z) 7z x $f;;
|
||||
esac
|
||||
}}
|
||||
|
||||
#vim:set noet sts=0 sw=2 ts=8:
|
@ -62,7 +62,7 @@ bindsym XF86AudioPrev exec 'playerctl previous'
|
||||
#borders stuff
|
||||
|
||||
default_border pixel 2
|
||||
#workspace_auto_back_and_forth yes
|
||||
workspace_auto_back_and_forth yes
|
||||
force_display_urgency_hint 500 ms
|
||||
smart_borders no_gaps
|
||||
|
||||
|
22
.zshrc
22
.zshrc
@ -7,25 +7,21 @@ echo '\033[0;34m @ '$HOST
|
||||
if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then
|
||||
print -P "%F{33}▓▒░ %F{220}Installing %F{33}DHARMA%F{220} Initiative Plugin Manager (%F{33}zdharma/zinit%F{220})…%f"
|
||||
command mkdir -p "$HOME/.zinit" && command chmod g-rwX "$HOME/.zinit"
|
||||
command git clone https://github.com/zdharma-continuum/zinit "$HOME/.zinit/bin" && \
|
||||
command git clone https://github.com/zdharma/zinit "$HOME/.zinit/bin" && \
|
||||
print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \
|
||||
print -P "%F{160}▓▒░ The clone has failed.%f%b"
|
||||
fi
|
||||
source "$HOME/.zinit/bin/zinit.zsh"
|
||||
|
||||
zinit ice lucid wait
|
||||
zinit light zdharma-continuum/fast-syntax-highlighting
|
||||
zinit ice lucid wait
|
||||
zinit light agkozak/zsh-z
|
||||
zinit ice lucid wait
|
||||
zinit light zpm-zsh/colorize
|
||||
|
||||
zinit ice compile'(pure|async).zsh' pick'async.zsh' src'pure.zsh'
|
||||
zinit light sindresorhus/pure
|
||||
zinit light zsh-users/zsh-autosuggestions
|
||||
zinit light hlissner/zsh-autopair
|
||||
zinit light zsh-users/zsh-history-substring-search
|
||||
|
||||
zinit ice lucid wait
|
||||
zinit light zdharma/fast-syntax-highlighting
|
||||
zinit ice lucid wait
|
||||
zinit light agkozak/zsh-z
|
||||
|
||||
autoload -Uz _zinit
|
||||
(( ${+_comps} )) && _comps[zinit]=_zinit
|
||||
@ -132,12 +128,16 @@ alias b='bat -n'
|
||||
alias btctl='bluetoothctl'
|
||||
alias cp='cp -iv'
|
||||
alias df='df -h'
|
||||
alias diff='diff --color=auto'
|
||||
alias e='emerge'
|
||||
alias free='free -h'
|
||||
alias g='git'
|
||||
alias grep='grep --color=auto'
|
||||
alias info="info --vi-keys"
|
||||
alias la='ls -la --human-readable'
|
||||
alias ll='ls -l --human-readable'
|
||||
alias ip='ip -color=auto'
|
||||
alias la='ls -la --color=auto --human-readable'
|
||||
alias ll='ls -l --color=auto --human-readable'
|
||||
alias ls='ls --color=auto'
|
||||
alias nya='doas'
|
||||
alias p='python'
|
||||
alias se='doas emerge'
|
||||
|
Loading…
Reference in New Issue
Block a user