mirror of
https://github.com/rydesun/dotfiles.git
synced 2026-01-01 02:14:57 +08:00
trivia
This commit is contained in:
parent
a0d6a76bfd
commit
52a717478c
5 changed files with 17 additions and 18 deletions
|
|
@ -1,5 +1,3 @@
|
|||
env:
|
||||
LANG: en_US.UTF-8
|
||||
window:
|
||||
class:
|
||||
instance: Terminal Emulator
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@ versiondiffnew = 9
|
|||
requireenterconfirm = yes
|
||||
printcommands = no
|
||||
reversesearchsorting = yes
|
||||
aursearchsorting = hottest
|
||||
displaylastupdated = no
|
||||
groupbyrepository = yes
|
||||
|
||||
[misc]
|
||||
sudoloopinterval = 59
|
||||
|
|
|
|||
|
|
@ -3,13 +3,6 @@ setopt no_beep # 不响铃
|
|||
setopt correct # 修正命令
|
||||
setopt interactive_comments # 交互模式支持注释
|
||||
|
||||
# 与当前主机相关的配置
|
||||
if [[ -d ${XDG_CONFIG_HOME}/zsh/hostrc.d ]]; then
|
||||
for f in ${XDG_CONFIG_HOME}/zsh/hostrc.d/?*.zsh; do
|
||||
source $f
|
||||
done; unset f
|
||||
fi
|
||||
|
||||
# 插件 <<<------------------------------
|
||||
command -v antibody &>/dev/null && source <(antibody init) && \
|
||||
antibody bundle <<EOF
|
||||
|
|
@ -72,6 +65,12 @@ fi
|
|||
export FZF_COMPLETION_TRIGGER='~~'
|
||||
export FZF_DEFAULT_COMMAND='fd -uu -E .git -E .node_modules'
|
||||
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
||||
|
||||
# 当前环境的配置
|
||||
_ZSH_HOSTRC_COMMAND=${XDG_CONFIG_HOME}/zsh/hostrc.d/funcs.zsh
|
||||
if [[ -e $_ZSH_HOSTRC_COMMAND ]]; then
|
||||
source $_ZSH_HOSTRC_COMMAND
|
||||
fi
|
||||
# >>>-----------------------------------
|
||||
|
||||
# 按键绑定 <<<--------------------------
|
||||
|
|
@ -93,6 +92,11 @@ autoload -Uz colors
|
|||
colors
|
||||
setopt transient_rprompt # 右提示符只出现一次
|
||||
|
||||
_ZSH_HOSTRC_PROMPT=${XDG_CONFIG_HOME}/zsh/hostrc.d/colors.zsh
|
||||
if [[ -e $_ZSH_HOSTRC_PROMPT ]]; then
|
||||
source $_ZSH_HOSTRC_PROMPT
|
||||
fi
|
||||
|
||||
if [[ -n ${_SPEC_color_host} ]]; then
|
||||
_color_host=${_SPEC_color_host}
|
||||
else
|
||||
|
|
@ -185,12 +189,14 @@ alias l='ls -l'
|
|||
alias la='ls -Al'
|
||||
mcd() { mkdir -p $1 && cd $1 }
|
||||
|
||||
alias x='xdg-open'
|
||||
alias v='nvim -R -c "nnoremap q :exit<CR>"' && compdef v=nvim # 使用neovim作为pager
|
||||
alias e='nvim' && compdef e=nvim
|
||||
alias es='nvim -S' && compdef es=nvim
|
||||
alias g='git' && compdef g=git
|
||||
alias py='python' && compdef py=python
|
||||
alias config='/usr/bin/git --git-dir=$HOME/.myconf/ --work-tree=$HOME' && compdef config=git
|
||||
alias config.edit='GIT_DIR=$HOME/.myconf GIT_WORK_TREE=$HOME nvim' && compdef config.edit=nvim
|
||||
alias ssh='TERM=xterm-256color ssh'
|
||||
alias mountdisk="mount | grep -E '^(/dev/sd|/dev/nvme|/dev/mmcblk|gvfsd-fuse)' | awk '{print \$1 \"\t\" \$5 \"\t\" \$3 \"\n\t\t\" \$6}'"
|
||||
# >>>-----------------------------------
|
||||
|
|
|
|||
2
.config/zsh/hostrc.d/.gitignore
vendored
2
.config/zsh/hostrc.d/.gitignore
vendored
|
|
@ -1 +1 @@
|
|||
/individual.zsh
|
||||
/colors.zsh
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
# Arch Linux
|
||||
alias pmq='pacman -Qs'
|
||||
alias pms='pacman -Ss'
|
||||
pmi() { pacman -Qi $1 2>/dev/null || pacman -Sii $1 }
|
||||
pmo() { pacman -Qoq $1 2>/dev/null || pkgfile -i $1 }
|
||||
pml() { (pacman -Qlq $1 2>/dev/null || pkgfile -lq $1) | sed '/\/$/d' }
|
||||
pmb() { (pacman -Qlq $1 2>/dev/null || pkgfile -lq $1) | awk -F/ '/\/usr\/bin\/.+[^/]$/{print $NF}' }
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue