setup zshrc to automatically install oh-my-zsh and other plugins if they
are not installed. add .zshenv to set ZDOTDIRmaster
parent
d08f4d9e35
commit
6a77e6cfc2
|
@ -1,2 +0,0 @@
|
||||||
font=Consolas
|
|
||||||
logotext={\\1c&H00\\bord0\\fs30\\fn微软雅黑 light\\fscx125}MPV{\\fscx100} 播放器
|
|
|
@ -1,3 +1,26 @@
|
||||||
|
# Path to your oh-my-zsh installation.
|
||||||
|
export ZSH="$HOME/.local/share/oh-my-zsh"
|
||||||
|
|
||||||
|
! [ -d "$HOME"/.local/share/ ] && mkdir -p "$HOME"/.local/share
|
||||||
|
|
||||||
|
if ! [ -d "$HOME"/.local/share/oh-my-zsh ]; then
|
||||||
|
echo "installing oh-my-zsh"
|
||||||
|
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh) --unattended --keep-zshrc"
|
||||||
|
echo "done installing oh-my-zsh"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! [ -d "$HOME"/.local/share/oh-my-zsh/custom/themes/powerlevel10k ]; then
|
||||||
|
echo "installing powerlevel10k"
|
||||||
|
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.local/share/oh-my-zsh/custom}/themes/powerlevel10k
|
||||||
|
echo "done installing powerlevel10k"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! [ -d "$HOME"/.local/share/oh-my-zsh/custom/plugins/zsh-syntax-highlighting ]; then
|
||||||
|
echo "installing zsh-syntax-highlighting"
|
||||||
|
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.local/share/oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
|
||||||
|
echo "done installing zsh-syntax-highlighting"
|
||||||
|
fi
|
||||||
|
|
||||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
||||||
# Initialization code that may require console input (password prompts, [y/n]
|
# Initialization code that may require console input (password prompts, [y/n]
|
||||||
# confirmations, etc.) must go above this block; everything else may go below.
|
# confirmations, etc.) must go above this block; everything else may go below.
|
||||||
|
@ -8,9 +31,6 @@ fi
|
||||||
# If you come from bash you might have to change your $PATH.
|
# If you come from bash you might have to change your $PATH.
|
||||||
# export PATH=$HOME/bin:/usr/local/bin:$PATH
|
# export PATH=$HOME/bin:/usr/local/bin:$PATH
|
||||||
|
|
||||||
# Path to your oh-my-zsh installation.
|
|
||||||
export ZSH="$HOME/.oh-my-zsh"
|
|
||||||
|
|
||||||
# Set name of the theme to load --- if set to "random", it will
|
# Set name of the theme to load --- if set to "random", it will
|
||||||
# load a random theme each time oh-my-zsh is loaded, in which case,
|
# load a random theme each time oh-my-zsh is loaded, in which case,
|
||||||
# to know which specific one was loaded, run: echo $RANDOM_THEME
|
# to know which specific one was loaded, run: echo $RANDOM_THEME
|
||||||
|
@ -102,6 +122,8 @@ source $ZSH/oh-my-zsh.sh
|
||||||
# Compilation flags
|
# Compilation flags
|
||||||
# export ARCHFLAGS="-arch x86_64"
|
# export ARCHFLAGS="-arch x86_64"
|
||||||
|
|
||||||
|
compinit -d "$HOME"/.cache/zcompdump
|
||||||
|
|
||||||
# Set personal aliases, overriding those provided by oh-my-zsh libs,
|
# Set personal aliases, overriding those provided by oh-my-zsh libs,
|
||||||
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
|
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
|
||||||
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
|
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
|
||||||
|
@ -110,7 +132,9 @@ source $ZSH/oh-my-zsh.sh
|
||||||
# Example aliases
|
# Example aliases
|
||||||
# alias zshconfig="mate ~/.zshrc"
|
# alias zshconfig="mate ~/.zshrc"
|
||||||
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
||||||
source ~/.config/aliasrc
|
[ -f ~/.config/aliasrc ] && source ~/.config/aliasrc
|
||||||
|
|
||||||
# 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 ~/.config/zsh/.p10k.zsh ]] || source ~/.config/zsh/.p10k.zsh
|
||||||
|
|
||||||
|
cd "$HOME"
|
66
.zprofile
66
.zprofile
|
@ -1,66 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
export XDG_DATA_HOME="$HOME/.local/share"
|
|
||||||
export XDG_CONFIG_HOME="$HOME/.config"
|
|
||||||
export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/notmuch-config"
|
|
||||||
export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0"
|
|
||||||
export WGETRC="${XDG_CONFIG_HOME:-$HOME/.config}/wget/wgetrc"
|
|
||||||
export INPUTRC="${XDG_CONFIG_HOME:-$HOME/.config}/inputrc"
|
|
||||||
export WINEPREFIX="$XDG_DATA_HOME/wineprefixes/default"
|
|
||||||
export STACK_ROOT="$XDG_DATA_HOME"/stack
|
|
||||||
export PASSWORD_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/password-store"
|
|
||||||
export GNUPGHOME="$XDG_DATA_HOME/gnupg"
|
|
||||||
export CARGO_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/cargo"
|
|
||||||
export GOPATH="${XDG_DATA_HOME:-$HOME/.local/share}/go"
|
|
||||||
export ANSIBLE_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/ansible/ansible.cfg"
|
|
||||||
export TMUX_TMPDIR="$XDG_RUNTIME_DIR"
|
|
||||||
export ANDROID_SDK_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android"
|
|
||||||
export MBSYNCRC="${XDG_CONFIG_HOME:-$HOME/.config}/mbsync/config"
|
|
||||||
export ELECTRUMDIR="${XDG_DATA_HOME:-$HOME/.local/share}/electrum"
|
|
||||||
export GHCUP_USE_XDG_DIRS=true
|
|
||||||
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc
|
|
||||||
|
|
||||||
|
|
||||||
#make firefox/librewolf use wayland
|
|
||||||
export GDK_BACKEND=wayland
|
|
||||||
export MOZ_ENABLE_WAYLAND=1
|
|
||||||
|
|
||||||
#theming
|
|
||||||
export GTK_THEME=Adwaita:dark
|
|
||||||
export XCURSOR_THEME=Adwaita
|
|
||||||
|
|
||||||
#add to path
|
|
||||||
export PATH="$PATH:$HOME/.local/bin"
|
|
||||||
export PATH="$PATH:$HOME/.local/scripts"
|
|
||||||
export PATH="$PATH:/var/lib/flatpak/exports/bin"
|
|
||||||
|
|
||||||
export LESSHISTFILE="-"
|
|
||||||
|
|
||||||
export LESS_TERMCAP_mb="$(printf '%b' '[1;31m')"
|
|
||||||
export LESS_TERMCAP_md="$(printf '%b' '[1;36m')"
|
|
||||||
export LESS_TERMCAP_me="$(printf '%b' '[0m')"
|
|
||||||
export LESS_TERMCAP_so="$(printf '%b' '[01;44;33m')"
|
|
||||||
export LESS_TERMCAP_se="$(printf '%b' '[0m')"
|
|
||||||
export LESS_TERMCAP_us="$(printf '%b' '[1;32m')"
|
|
||||||
export LESS_TERMCAP_ue="$(printf '%b' '[0m')"
|
|
||||||
|
|
||||||
export MANPAGER=less
|
|
||||||
export XDG_CURRENT_DESKTOP="sway"
|
|
||||||
|
|
||||||
#sfeed vars
|
|
||||||
export SFEED_PLUMBER="$BROWSER"
|
|
||||||
export SFEED_URL_FILE="$HOME/.local/share/sfeed/read"
|
|
||||||
|
|
||||||
#set programs
|
|
||||||
export EDITOR=nvim
|
|
||||||
export BROWSER="browser.sh"
|
|
||||||
|
|
||||||
|
|
||||||
#lf icons
|
|
||||||
. "$HOME"/.config/lf/lf-icons.sh
|
|
||||||
|
|
||||||
#fixes
|
|
||||||
#fix weird terminal issues
|
|
||||||
#export TERM="xterm-256color"
|
|
||||||
#fix arduino ide issues
|
|
||||||
export AWT_TOOLKIT=MToolkit
|
|
Loading…
Reference in New Issue