envrc more flex

This commit is contained in:
A.C.Sukazyo Eyre 2024-04-16 15:08:35 +08:00
parent 4848f52258
commit 5556e6bf31
Signed by: Eyre_S
GPG Key ID: EFB47D98FE082FAD
7 changed files with 56 additions and 72 deletions

View File

@ -1,17 +1,13 @@
{
"backups": [
{
"path": "zsh/public.zshrc.zsh",
"path": "zsh/zshrc.zsh",
"source": "~/.zshrc"
},
{
"path": "zsh/public.custom.zsh",
"path": "zsh/custom.zsh",
"source": "~/.customrc"
},
{
"path": "zsh/linux.env.zsh",
"source": "~/.envrc"
},
{
"path": "zsh/p10k.zsh",
"source": "~/.p10k.zsh"
@ -33,4 +29,4 @@
"source": "~/.config/hyfetch.json"
}
]
}
}

View File

@ -1,17 +1,13 @@
{
"backups": [
{
"path": "zsh/public.zshrc.zsh",
"path": "zsh/zshrc.zsh",
"source": "~/.zshrc"
},
{
"path": "zsh/public.custom.zsh",
"path": "zsh/custom.zsh",
"source": "~/.customrc"
},
{
"path": "zsh/termux.env.zsh",
"source": "~/.envrc"
},
{
"path": "zsh/p10k.zsh",
"source": "~/.p10k.zsh"
@ -33,4 +29,4 @@
"source": "~/.config/hyfetch.json"
}
]
}
}

View File

@ -1,10 +1,14 @@
#!/bin/zsh
#--- zshrc ---#
edit_profile () {
code -n -w $profile
profile () {
source $profile
}
profile-edit () {
$POPUP_EDIT $profile
profile
}
#--- bat (cat) ---#
alias cat='bat'

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"

View File

@ -1,23 +0,0 @@
#!/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"

View File

@ -1,28 +0,0 @@
#!/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"

View File

@ -92,10 +92,10 @@ plugins=(
source $ZSH/oh-my-zsh.sh
# User configuration
source $HOME/.envrc
source $HOME/.customrc
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# User configuration
source $HOME/.envrc
source $HOME/.customrc