merge zsh and powershell

This commit is contained in:
A.C.Sukazyo Eyre 2024-04-16 22:39:04 +08:00
commit d95bca7bc5
Signed by: Eyre_S
GPG Key ID: C17CE40291207874
6 changed files with 1817 additions and 73 deletions

View File

@ -1,8 +1,16 @@
{
"backups": [
{
"path": "zsh/linux.custom_rc.zsh",
"source": "~/.custom_rc"
"path": "zsh/zshrc.zsh",
"source": "~/.zshrc"
},
{
"path": "zsh/custom.zsh",
"source": "~/.customrc"
},
{
"path": "zsh/p10k.zsh",
"source": "~/.p10k.zsh"
},
{
"path": "lsd",
@ -21,4 +29,4 @@
"source": "~/.config/hyfetch.json"
}
]
}
}

View File

@ -1,9 +1,17 @@
{
"backups": [
{
"path": "zsh/termux.zshrc.zsh",
"path": "zsh/zshrc.zsh",
"source": "~/.zshrc"
},
{
"path": "zsh/custom.zsh",
"source": "~/.customrc"
},
{
"path": "zsh/p10k.zsh",
"source": "~/.p10k.zsh"
},
{
"path": "lsd",
"source": "~/.config/lsd"
@ -21,4 +29,4 @@
"source": "~/.config/hyfetch.json"
}
]
}
}

View File

@ -1,8 +1,18 @@
#!/bin/zsh
#=== bat (cat)
#--- zshrc ---#
profile () {
source $profile
}
profile-edit () {
$POPUP_EDIT $profile
profile
}
#--- bat (cat) ---#
alias cat='bat'
#=== lsd
#--- lsd ---#
alias cols='lsd'
alias crls='cols'
alias ccls='crls -g'
@ -16,7 +26,7 @@ alias ll='cll'
alias la='cla'
alias lgg='ccls --tree'
#=== zoxide (cd)
#--- zoxide (cd) ---#
# zoxide must init after compinit is called
eval "$(zoxide init zsh)"
alias cd='z'

39
zsh/env.example.zsh Normal file
View File

@ -0,0 +1,39 @@
#!/bin/zsh
#--- System Environments ---#
# export MANPATH="/usr/local/man:$MANPATH"
#- You may need to manually set your language environment
# export LANG=en_US.UTF-8
#- Compilation flags
# export ARCHFLAGS="-arch x86_64"
#--- Editor (for normal system local/remote) ---#
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='code'
export POPUP_EDIT='code -n -w'
else
export EDITOR='vim'
export POPUP_EDIT='vim'
fi
#--- Editor: EMacs as Code (for termux only) ---#
alias vim='nvim'
export PATH="$PATH:$HOME/.config/doom/bin"
alias code='emacs'
export EDITOR='code'
export POPUP_EDIT='code'
#--- Environment Variables ---#
# System Mounts
export windows="/mnt/c"
export data="/mnt/s"
export external="/storage/54D5-A5C0"
# Home Configs
export profile="$HOME/.zshrc"
export config="$HOME/.config"
# Workspaces
export ws="$HOME/documents/workspaces"
export tests="$data/__test"

1730
zsh/p10k.zsh Normal file

File diff suppressed because it is too large Load Diff

View File

@ -32,7 +32,7 @@ ZSH_THEME="powerlevel10k/powerlevel10k"
# Uncomment one of the following lines to change the auto-update behavior
# zstyle ':omz:update' mode disabled # disable automatic updates
# zstyle ':omz:update' mode auto # update automatically without asking
zstyle ':omz:update' mode auto # update automatically without asking
# zstyle ':omz:update' mode reminder # just remind me to update when it's time
# Uncomment the following line to change how often to auto-update (in days).
@ -77,76 +77,25 @@ ZSH_THEME="powerlevel10k/powerlevel10k"
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src
plugins=(
git
ssh-agent
zsh-autosuggestions
zsh-shift-select
zsh-syntax-highlighting
git
sudo
copypath
copyfile
# below required the plugins installed
zsh-shift-select
zsh-autosuggestions
zsh-syntax-highlighting
zsh-history-substring-search
)
source $ZSH/oh-my-zsh.sh
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
#-- global useful vars --#
source "$HOME/.envrc"
export profile="$HOME/.zshrc"
export config="$HOME/.config"
export ws="$HOME/documents/workspaces"
edit_profile () {
emacs $profile
source $profile
}
#-- termux-only: enhanced shell editor --#
alias vim='nvim'
export PATH="$HOME/.config/emacs/bin:$PATH"
alias code='emacs'
#-- batcat --#
alias cat='bat'
#-- lsd (colorls before) --#
alias cols='lsd'
alias crls='cols'
alias ccls='crls -g'
alias cl='ccls -lA'
alias cll='ccls -l'
alias cla='ccls -la'
alias lc='ccls'
alias ls='lc'
alias l='cl'
alias ll='cll'
alias la='cla'
alias lgg='ccls --tree'
# Created by `pipx` on 2024-04-06 11:25:10
export PATH="$PATH:/data/data/com.termux/files/home/.local/bin"
# User configuration
source $HOME/.envrc
source $HOME/.customrc