diff options
author | Saumit Dinesan <justsaumit@protonmail.com> | 2022-05-22 00:37:40 +0530 |
---|---|---|
committer | Saumit Dinesan <justsaumit@protonmail.com> | 2022-05-22 00:37:40 +0530 |
commit | c3362aefa2e762211409923cfff065541bebf9e7 (patch) | |
tree | e48e225190fc0bb1a2db18ae2510a89a6f0d8653 /.zshenv | |
parent | 4df17a688ba54d710a1d46ee47cb65b5c9e75764 (diff) |
ble.sh & z4h addition
Diffstat (limited to '.zshenv')
-rw-r--r-- | .zshenv | 49 |
1 files changed, 34 insertions, 15 deletions
@@ -1,21 +1,40 @@ -#!/bin/zsh # Default Applications export EDITOR="nvim" export READER="zathura" export TERMINAL="st" export BROWSER="brave" +export MANPAGER="sh -c 'col -bx | bat -l man -p'" -# Start blinking -export LESS_TERMCAP_mb=$(tput bold; tput setaf 2) # green -# Start bold -export LESS_TERMCAP_md=$(tput bold; tput setaf 2) # green -# Start stand out -export LESS_TERMCAP_so=$(tput bold; tput setaf 3) # yellow -# End standout -export LESS_TERMCAP_se=$(tput rmso; tput sgr0) -# Start underline -export LESS_TERMCAP_us=$(tput smul; tput bold; tput setaf 1) # red -# End Underline -export LESS_TERMCAP_ue=$(tput sgr0) -# End bold, blinking, standout, underline -export LESS_TERMCAP_me=$(tput sgr0) + +# Documentation: https://github.com/romkatv/zsh4humans/blob/v5/README.md. + +if [ -n "${ZSH_VERSION-}" ]; then + : ${ZDOTDIR:=~} + setopt no_global_rcs + [[ -o no_interactive && -z "${Z4H_BOOTSTRAPPING-}" ]] && return + setopt no_rcs + unset Z4H_BOOTSTRAPPING +fi + +Z4H_URL="https://raw.githubusercontent.com/romkatv/zsh4humans/v5" +: "${Z4H:=${XDG_CACHE_HOME:-$HOME/.cache}/zsh4humans/v5}" + +umask o-w + +if [ ! -e "$Z4H"/z4h.zsh ]; then + mkdir -p -- "$Z4H" || return + >&2 printf '\033[33mz4h\033[0m: fetching \033[4mz4h.zsh\033[0m\n' + if command -v curl >/dev/null 2>&1; then + curl -fsSL -- "$Z4H_URL"/z4h.zsh >"$Z4H"/z4h.zsh.$$ || return + elif command -v wget >/dev/null 2>&1; then + wget -O- -- "$Z4H_URL"/z4h.zsh >"$Z4H"/z4h.zsh.$$ || return + else + >&2 printf '\033[33mz4h\033[0m: please install \033[32mcurl\033[0m or \033[32mwget\033[0m\n' + return 1 + fi + mv -- "$Z4H"/z4h.zsh.$$ "$Z4H"/z4h.zsh || return +fi + +. "$Z4H"/z4h.zsh || return + +setopt rcs |