add zsh config, switch from fish
This commit is contained in:
6
.config/zsh/.zprofile
Normal file
6
.config/zsh/.zprofile
Normal file
@ -0,0 +1,6 @@
|
||||
# start X at login on first console or otherwise source ~/.profile
|
||||
if [[ -z "$DISPLAY" && "$XDG_VTNR" -eq 1 ]] && which /bin/sx > /dev/null; then
|
||||
exec sx ~/.xsession
|
||||
else
|
||||
source ~/.profile
|
||||
fi
|
42
.config/zsh/.zshrc
Normal file
42
.config/zsh/.zshrc
Normal file
@ -0,0 +1,42 @@
|
||||
# Path to oh-my-zsh installation.
|
||||
export ZSH="/home/lupan/.config/zsh/oh-my-zsh"
|
||||
|
||||
# Set name of the theme to load.
|
||||
ZSH_THEME="gentoo"
|
||||
|
||||
# Disable auto-update checks.
|
||||
DISABLE_AUTO_UPDATE="true"
|
||||
|
||||
# Change the command execution time stamp shown in the history command output.
|
||||
HIST_STAMPS="yyyy-mm-dd"
|
||||
|
||||
# Change path to history file.
|
||||
HISTFILE="$ZDOTDIR/.zsh_history"
|
||||
|
||||
# Styles.
|
||||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#ff00ff,underline"
|
||||
|
||||
# Plugins to load.
|
||||
plugins=(git scd zsh-syntax-highlighting zsh-autosuggestions)
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
# Directory tracking in Emacs vterm.
|
||||
|
||||
function vterm_printf(){
|
||||
if [ -n "$TMUX" ]; then
|
||||
# tell tmux to pass the escape sequences through
|
||||
# (Source: http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324)
|
||||
printf "\ePtmux;\e\e]%s\007\e\\" "$1"
|
||||
elif [ "${TERM%%-*}" = "screen" ]; then
|
||||
# GNU screen (screen, screen-256color, screen-256color-bce)
|
||||
printf "\eP\e]%s\007\e\\" "$1"
|
||||
else
|
||||
printf "\e]%s\e\\" "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
vterm_prompt_end() {
|
||||
vterm_printf "51;A$(whoami)@$(hostname):$(pwd)";
|
||||
}
|
||||
PROMPT=$PROMPT'%{$(vterm_prompt_end)%}'
|
Reference in New Issue
Block a user