zsh configs added
This commit is contained in:
parent
3aafd7aa48
commit
fb0231b720
3 changed files with 1819 additions and 1 deletions
1701
.config/zsh/.zcompdump
Normal file
1701
.config/zsh/.zcompdump
Normal file
File diff suppressed because it is too large
Load diff
71
.config/zsh/.zshrc
Normal file
71
.config/zsh/.zshrc
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
# Luke's config for the Zoomer Shell
|
||||||
|
|
||||||
|
autoload -U colors && colors
|
||||||
|
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
|
||||||
|
|
||||||
|
# Load aliases and shortcuts if existent.
|
||||||
|
[ -f "$HOME/.config/shortcutrc" ] && source "$HOME/.config/shortcutrc"
|
||||||
|
[ -f "$HOME/.config/aliasrc" ] && source "$HOME/.config/aliasrc"
|
||||||
|
|
||||||
|
autoload -U compinit
|
||||||
|
zstyle ':completion:*' menu select
|
||||||
|
zmodload zsh/complist
|
||||||
|
compinit
|
||||||
|
|
||||||
|
# Include hidden files in autocomplete:
|
||||||
|
_comp_options+=(globdots)
|
||||||
|
|
||||||
|
# Use vim keys in tab complete menu:
|
||||||
|
bindkey -M menuselect 'h' vi-backward-char
|
||||||
|
bindkey -M menuselect 'k' vi-up-line-or-history
|
||||||
|
bindkey -M menuselect 'l' vi-forward-char
|
||||||
|
bindkey -M menuselect 'j' vi-down-line-or-history
|
||||||
|
bindkey -v '^?' backward-delete-char
|
||||||
|
|
||||||
|
export KEYTIMEOUT=1
|
||||||
|
|
||||||
|
# Change cursor shape for different vi modes.
|
||||||
|
function zle-keymap-select {
|
||||||
|
if [[ ${KEYMAP} == vicmd ]] ||
|
||||||
|
[[ $1 = 'block' ]]; then
|
||||||
|
echo -ne '\e[1 q'
|
||||||
|
|
||||||
|
elif [[ ${KEYMAP} == main ]] ||
|
||||||
|
[[ ${KEYMAP} == viins ]] ||
|
||||||
|
[[ ${KEYMAP} = '' ]] ||
|
||||||
|
[[ $1 = 'beam' ]]; then
|
||||||
|
echo -ne '\e[5 q'
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
zle -N zle-keymap-select
|
||||||
|
|
||||||
|
zle-line-init() {
|
||||||
|
zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere)
|
||||||
|
echo -ne "\e[5 q"
|
||||||
|
}
|
||||||
|
zle -N zle-line-init
|
||||||
|
|
||||||
|
# Use beam shape cursor on startup.
|
||||||
|
echo -ne '\e[5 q'
|
||||||
|
# Use beam shape cursor for each new prompt.
|
||||||
|
preexec() { echo -ne '\e[5 q' ;}
|
||||||
|
|
||||||
|
# Use lf to switch directories and bind it to ctrl-o
|
||||||
|
lfcd () {
|
||||||
|
tmp="$(mktemp)"
|
||||||
|
lf -last-dir-path="$tmp" "$@"
|
||||||
|
if [ -f "$tmp" ]; then
|
||||||
|
dir="$(cat "$tmp")"
|
||||||
|
rm -f "$tmp"
|
||||||
|
if [ -d "$dir" ]; then
|
||||||
|
if [ "$dir" != "$(pwd)" ]; then
|
||||||
|
cd "$dir"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
bindkey -s '^o' 'lfcd\n' # zsh
|
||||||
|
|
||||||
|
# Load zsh-syntax-highlighting; should be last.
|
||||||
|
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null
|
|
@ -1 +0,0 @@
|
||||||
.profile
|
|
47
.zprofile
Normal file
47
.zprofile
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Profile file. Runs on login. Environmental variables are set here.
|
||||||
|
|
||||||
|
# Adds `~/.local/bin` to $PATH
|
||||||
|
export PATH="$PATH:$HOME/.local/bin/:$HOME/.local/bin/personal"
|
||||||
|
|
||||||
|
# Default programs:
|
||||||
|
export EDITOR="nvim"
|
||||||
|
export TERMINAL="st"
|
||||||
|
export BROWSER="brave"
|
||||||
|
export READER="zathura"
|
||||||
|
export FILE="lf"
|
||||||
|
|
||||||
|
# ~/ Clean-up:
|
||||||
|
export NOTMUCH_CONFIG="$HOME/.config/notmuch-config"
|
||||||
|
export GTK2_RC_FILES="$HOME/.config/gtk-2.0/gtkrc-2.0"
|
||||||
|
export LESSHISTFILE="-"
|
||||||
|
export INPUTRC="$HOME/.config/inputrc"
|
||||||
|
export ZDOTDIR="$HOME/.config/zsh"
|
||||||
|
export PASSWORD_STORE_DIR="$HOME/.local/share/password-store"
|
||||||
|
|
||||||
|
export IP="155.138.195.222"
|
||||||
|
export CAB="207.246.120.93"
|
||||||
|
|
||||||
|
# Other program settings:
|
||||||
|
export BIB="$HOME/dox/latex/uni.bib"
|
||||||
|
export REFER="$HOME/dox/referbib"
|
||||||
|
export DICS="/usr/share/stardict/dic/"
|
||||||
|
export SUDO_ASKPASS="$HOME/.local/bin/dmenupass"
|
||||||
|
export FZF_DEFAULT_OPTS="--layout=reverse --height 40%"
|
||||||
|
export LESS=-R
|
||||||
|
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')"
|
||||||
|
|
||||||
|
[ ! -f ~/.config/shortcutrc ] && shortcuts >/dev/null 2>&1
|
||||||
|
|
||||||
|
# Start graphical server on tty1 if not already running.
|
||||||
|
# [ "$(tty)" = "/dev/tty1" ] && ! pgrep -x Xorg >/dev/null && exec startx
|
||||||
|
|
||||||
|
# Switch escape and caps if tty:
|
||||||
|
sudo -n loadkeys ~/.local/share/larbs/ttymaps.kmap 2>/dev/null
|
Loading…
Reference in a new issue