add full zsh/omz/p10k configures

This commit is contained in:
A.C.Sukazyo Eyre 2024-04-16 13:54:22 +08:00
parent 276033fbe3
commit 4848f52258
Signed by: Eyre_S
GPG Key ID: C17CE40291207874
7 changed files with 1830 additions and 69 deletions

View File

@ -1,8 +1,20 @@
{ {
"backups": [ "backups": [
{ {
"path": "zsh/linux.custom_rc.zsh", "path": "zsh/public.zshrc.zsh",
"source": "~/.custom_rc" "source": "~/.zshrc"
},
{
"path": "zsh/public.custom.zsh",
"source": "~/.customrc"
},
{
"path": "zsh/linux.env.zsh",
"source": "~/.envrc"
},
{
"path": "zsh/p10k.zsh",
"source": "~/.p10k.zsh"
}, },
{ {
"path": "lsd", "path": "lsd",

View File

@ -1,9 +1,21 @@
{ {
"backups": [ "backups": [
{ {
"path": "zsh/termux.zshrc.zsh", "path": "zsh/public.zshrc.zsh",
"source": "~/.zshrc" "source": "~/.zshrc"
}, },
{
"path": "zsh/public.custom.zsh",
"source": "~/.customrc"
},
{
"path": "zsh/termux.env.zsh",
"source": "~/.envrc"
},
{
"path": "zsh/p10k.zsh",
"source": "~/.p10k.zsh"
},
{ {
"path": "lsd", "path": "lsd",
"source": "~/.config/lsd" "source": "~/.config/lsd"

23
zsh/linux.env.zsh Normal file
View File

@ -0,0 +1,23 @@
#!/bin/zsh
# 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='code'
else
export EDITOR='vim'
fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# System Related Path Variables
export profile="$HOME/.zshrc"
export config="$HOME/.config"
# Workspaces
export ws="$HOME/documents/worksapce"
export tests="$HOME/documents/__test"

1730
zsh/p10k.zsh Normal file

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -32,7 +32,7 @@ ZSH_THEME="powerlevel10k/powerlevel10k"
# Uncomment one of the following lines to change the auto-update behavior # Uncomment one of the following lines to change the auto-update behavior
# zstyle ':omz:update' mode disabled # disable automatic updates # 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 # 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). # Uncomment the following line to change how often to auto-update (in days).
@ -77,75 +77,25 @@ ZSH_THEME="powerlevel10k/powerlevel10k"
# Custom plugins may be added to $ZSH_CUSTOM/plugins/ # Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse) # Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup. # Add wisely, as too many plugins slow down shell startup.
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src
plugins=( plugins=(
git git
zsh-autosuggestions sudo
copypath
copyfile
# below required the plugins installed
zsh-shift-select zsh-shift-select
zsh-autosuggestions
zsh-syntax-highlighting zsh-syntax-highlighting
zsh-history-substring-search
) )
source $ZSH/oh-my-zsh.sh source $ZSH/oh-my-zsh.sh
# User configuration # User configuration
# export MANPATH="/usr/local/man:$MANPATH" source $HOME/.envrc
source $HOME/.customrc
# 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. # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.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"

28
zsh/termux.env.zsh Normal file
View File

@ -0,0 +1,28 @@
#!/bin/zsh
# 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='code'
# else
# export EDITOR='code'
# fi
#--- EMacs as Code (for termux only) ---#
export PATH="$PATH:$HOME/.config/doom/bin"
alias code='emacs'
export EDITOR='code'
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# System Related Path Variables
export profile="$HOME/.zshrc"
export config="$HOME/.config"
# Workspaces
export ws="$HOME/documents/worksapce"
export tests="$HOME/documents/__test"