summaryrefslogtreecommitdiff
path: root/zsh/zshrc
blob: cce5d370a66af4c32a89aafbe4cc053a1411e6c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/zsh

# Colors! + Prompt
autoload -U colors && colors
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b " # TODO: change $ to # when root

# Load aliasrc and keybindrc
source "${XDG_CONFIG_HOME:-$HOME/.config}/zsh/aliasrc"
source "${XDG_CONFIG_HOME:-$HOME/.config}/zsh/keybindrc"
# lf icons
source "${XDG_CONFIG_HOME:-$HOME/.config}/zsh/lficons"

# Change cursor shape for different vi modes (Cred: LARBS)
function zle-keymap-select () {
	case $KEYMAP in
		vicmd) echo -ne '\e[1 q';;      # block
		viins|main) echo -ne '\e[5 q';; # beam
	esac
}
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
echo -ne '\e[5 q' # Use beam shape cursor on startup
preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt

# Load zsh plugins; should be last
#source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
source /usr/share/zsh/plugins/zsh-vim-mode/zsh-vim-mode.plugin.zsh
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null
source /home/timmy/.config/broot/launcher/bash/br