blob: aac136f2ed79db3e89650ef0c6f29b213f8ec7a9 (
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
34
35
36
37
38
39
40
41
42
43
44
45
46
|
#!/usr/bin/env 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/zsh/aliasrc"
source "$XDG_CONFIG_HOME/zsh/keybindrc"
# lf icons
source "$XDG_CONFIG_HOME/zsh/lficons"
# History settings
HISTFILE="$XDG_DATA_HOME/zsh/zhistory"
HISTSIZE=200 # Max lines of history loaded into memory
SAVEHIST=10000000 # Max lines of history saved to the histfile
setopt INC_APPEND_HISTORY # Create entries after each command, not after zsh exits
setopt SHARE_HISTORY # Share history between zsh sessions
setopt HIST_REDUCE_BLANKS
setopt HIST_IGNORE_DUPS # Successive duplicate entries ignored
setopt HIST_IGNORE_SPACE # Entries with leading space ignored
# This seems to reduce overall disk writes
#unsetopt EXTENDED_HISTORY # Save only the command, not any superfluous info
## 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 2>/dev/null
[ "$COMPUTER" = "desktop" ] && source /usr/share/zsh/site-functions/zsh-syntax-highlighting.zsh 2>/dev/null || \
[ "$COMPUTER" = "laptop" ] && source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null
#source /home/timmy/.config/broot/launcher/bash/br
|