mirror of
https://github.com/rywng/dotfiles.git
synced 2024-11-24 11:51:50 +08:00
Compare commits
2 Commits
1143f1f514
...
42883ee067
Author | SHA1 | Date | |
---|---|---|---|
|
42883ee067 | ||
|
c466b5eb9d |
@ -1,69 +0,0 @@
|
|||||||
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
|
#borders stuff
|
||||||
|
|
||||||
default_border pixel 2
|
default_border pixel 2
|
||||||
workspace_auto_back_and_forth yes
|
#workspace_auto_back_and_forth yes
|
||||||
force_display_urgency_hint 500 ms
|
force_display_urgency_hint 500 ms
|
||||||
smart_borders no_gaps
|
smart_borders no_gaps
|
||||||
|
|
||||||
|
22
.zshrc
22
.zshrc
@ -7,21 +7,25 @@ echo '\033[0;34m @ '$HOST
|
|||||||
if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then
|
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"
|
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 mkdir -p "$HOME/.zinit" && command chmod g-rwX "$HOME/.zinit"
|
||||||
command git clone https://github.com/zdharma/zinit "$HOME/.zinit/bin" && \
|
command git clone https://github.com/zdharma-continuum/zinit "$HOME/.zinit/bin" && \
|
||||||
print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \
|
print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \
|
||||||
print -P "%F{160}▓▒░ The clone has failed.%f%b"
|
print -P "%F{160}▓▒░ The clone has failed.%f%b"
|
||||||
fi
|
fi
|
||||||
source "$HOME/.zinit/bin/zinit.zsh"
|
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 ice compile'(pure|async).zsh' pick'async.zsh' src'pure.zsh'
|
||||||
zinit light sindresorhus/pure
|
zinit light sindresorhus/pure
|
||||||
zinit light zsh-users/zsh-autosuggestions
|
zinit light zsh-users/zsh-autosuggestions
|
||||||
|
zinit light hlissner/zsh-autopair
|
||||||
zinit light zsh-users/zsh-history-substring-search
|
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
|
autoload -Uz _zinit
|
||||||
(( ${+_comps} )) && _comps[zinit]=_zinit
|
(( ${+_comps} )) && _comps[zinit]=_zinit
|
||||||
@ -128,16 +132,12 @@ alias b='bat -n'
|
|||||||
alias btctl='bluetoothctl'
|
alias btctl='bluetoothctl'
|
||||||
alias cp='cp -iv'
|
alias cp='cp -iv'
|
||||||
alias df='df -h'
|
alias df='df -h'
|
||||||
alias diff='diff --color=auto'
|
|
||||||
alias e='emerge'
|
alias e='emerge'
|
||||||
alias free='free -h'
|
alias free='free -h'
|
||||||
alias g='git'
|
alias g='git'
|
||||||
alias grep='grep --color=auto'
|
|
||||||
alias info="info --vi-keys"
|
alias info="info --vi-keys"
|
||||||
alias ip='ip -color=auto'
|
alias la='ls -la --human-readable'
|
||||||
alias la='ls -la --color=auto --human-readable'
|
alias ll='ls -l --human-readable'
|
||||||
alias ll='ls -l --color=auto --human-readable'
|
|
||||||
alias ls='ls --color=auto'
|
|
||||||
alias nya='doas'
|
alias nya='doas'
|
||||||
alias p='python'
|
alias p='python'
|
||||||
alias se='doas emerge'
|
alias se='doas emerge'
|
||||||
|
Loading…
Reference in New Issue
Block a user