mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
-Simplified PS1 for extra screen space, especially in scratchpads. -Smaller history size. -No bindings for lf & bc. -No bindings for vi keys in tab completion menu (Didn't seem to work anyways).
49 lines
1.4 KiB
Bash
49 lines
1.4 KiB
Bash
# Helion's config for the Zoomer Shell
|
|
|
|
# Load aliases and shortcuts.
|
|
source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc"
|
|
|
|
autoload -U colors && colors # Load colors
|
|
PS1="%B%{$fg[red]%}[%{$fg[magenta]%}%~%{$fg[red]%}]$%b "
|
|
# PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
|
|
# For multi-user systems ^
|
|
|
|
setopt autocd # Automatically cd into typed directory.
|
|
stty stop undef # Disable ctrl-s to freeze terminal.
|
|
setopt interactive_comments
|
|
|
|
# History in cache directory:
|
|
HISTSIZE=1000
|
|
SAVEHIST=1000
|
|
HISTFILE=~/.cache/zsh/history
|
|
|
|
# Basic auto/tab complete:
|
|
autoload -U compinit
|
|
zstyle ':completion:*' menu select
|
|
zmodload zsh/complist
|
|
compinit
|
|
_comp_options+=(globdots) # Include hidden files.
|
|
|
|
# vi mode
|
|
bindkey -v
|
|
export KEYTIMEOUT=1
|
|
|
|
# Change cursor shape for different vi modes.
|
|
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
|
|
echo -ne '\e[5 q' # Use beam shape cursor on startup.
|
|
|
|
bindkey -s '^f' 'cd "$(dirname "$(fzf)")"\n'
|
|
|
|
# Open line in vim.
|
|
autoload edit-command-line; zle -N edit-command-line
|
|
bindkey '^e' edit-command-line
|
|
|
|
# Load syntax highlighting; should be last.
|
|
source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh 2>/dev/null
|