summaryrefslogtreecommitdiff
path: root/airootfs
diff options
context:
space:
mode:
authorTom Barrett <tom@tombarrett.xyz>2022-01-26 19:13:42 +0100
committerTom Barrett <tom@tombarrett.xyz>2022-01-26 19:13:42 +0100
commit153b54c096cd07da5c15d3e2ce527edd82bd068a (patch)
treefa49efe758b09cce847ba6081e67d0b0fe2d7334 /airootfs
parent1eb205603668d3f742c34e28a3043910c47ae3cb (diff)
more packages and ease of use
Diffstat (limited to 'airootfs')
-rw-r--r--airootfs/root/.zshrc84
1 files changed, 84 insertions, 0 deletions
diff --git a/airootfs/root/.zshrc b/airootfs/root/.zshrc
new file mode 100644
index 0000000..ce58bdd
--- /dev/null
+++ b/airootfs/root/.zshrc
@@ -0,0 +1,84 @@
+typeset -U PATH path
+path=( "$HOME/bin"
+ "$HOME/.local/bin"
+ "$HOME/.cargo/bin"
+ "/bin"
+ "/usr/bin"
+ "/usr/sbin"
+ "/usr/games"
+ "/usr/local/games"
+ "/usr/local/bin"
+ "/usr/local/sbin"
+ "/run/wrappers/bin"
+ "/home/$USER/.nix-profile/bin"
+ "/etc/profiles/per-user/$USER/bin"
+ "/nix/var/nix/profiles/default/bin"
+ "/run/current-system/sw/bin"
+)
+export PATH
+EDITOR=nvim
+export EDITOR
+
+autoload -Uz compinit
+compinit
+zmodload zsh/complist
+zstyle ':completion:*' menu select
+
+bindkey -v
+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
+
+function zle-keymap-select () {
+ case $KEYMAP in
+ vicmd) echo -ne '\e[1 q';;
+ viins|main) echo -ne '\e[5 q';;
+ esac
+}
+zle -N zle-keymap-select
+
+zle-line-init() {
+ zle -K viins
+ echo -ne "\e[5 q"
+}
+zle -N zle-line-init
+
+autoload -Uz edit-command-line
+zle -N edit-command-line
+bindkey '^e' edit-command-line
+
+alias ls='ls --color'
+alias la='ls -la --color'
+alias vim='nvim'
+alias listen='mpv --no-video'
+#alias mpv='mpv -vo=drm'
+
+setopt auto_cd
+
+HISTSIZE=999999999
+SAVEHIST=999999999
+HISTFILE=~/.history
+
+if [[ "$(grep ^ID= /etc/os-release)" == *"arch"* ]]; then
+ source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
+ source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
+elif [[ "$(grep ^ID= /etc/os-release)" == *"debian"* ]]; then
+ source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
+ source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh
+elif [[ "$(grep ^ID= /etc/os-release)" == *"ubuntu"* ]]; then
+ source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
+ source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh
+fi
+
+bindkey '^f' end-of-line
+
+autoload -Uz vcs_info
+precmd() { vcs_info }
+zstyle ':vcs_info:git:*' formats '|%F{3}%b%f'
+
+gpg-connect-agent updatestartuptty /bye > /dev/null
+
+setopt PROMPT_SUBST
+PROMPT='<%F{2}%n%f@%F{6}%m%f|%F{5}%~%f${vcs_info_msg_0_}%f> '