Compare commits

..

No commits in common. "9392c2eb1910cecae4d1a3b0e09c4151f8e663de" and "9da7b6babf05c25f8e61554bb1350b7fbadae7f3" have entirely different histories.

9 changed files with 8 additions and 55 deletions

View File

@ -34,10 +34,7 @@
## Use Exa instead of ls
## REQUIRES NERD FONT
has eza && EXA=eza || EXA=exa
has "$EXA" && alias ls="$EXA --icons --group-directories-first"
has "$EXA" && alias tree="$EXA --icons --group-directories-first --tree"
unset EXA
has exa && alias ls='exa --icons --group-directories-first'
## Shorten xdg-open
has xdg-open && alias xopen='xdg-open'
@ -75,8 +72,6 @@ has wineselect && alias ws='source wineselect'
## zero a terminal session
alias zero='dirs -c && clear'
has fzf && alias gp='cd `find ${Z_PROJECT_DIR:-$HOME/Projects} -type d -name .git | sed "s/.git//" | fzf --preview="cd {} && git log"`'
#########################
# FileType Associations #
# extension=program #

View File

@ -6,5 +6,5 @@ hash -d dx="$HOME/Documents"
hash -d dl="$HOME/Downloads"
hash -d cn="${XDG_CONFIG_HOME:-$HOME/.config}"
hash -d px="$HOME/Pictures"
hash -d pr="${Z_PROJECT_DIR:-$HOME/Projects}"
hash -d pr="$HOME/Projects"
# vim: ft=zsh

1
greet
View File

@ -15,4 +15,3 @@ if [ -d "$HOME/tmp" ]; then
fi
has randomVerse && randomVerse
has colours.sh && colours.sh
has glow && [ -f ~/TODO.md ] && glow ~/TODO.md

2
hooks
View File

@ -3,7 +3,7 @@ for file in $(find $ZDOTDIR/hooks.d -type f); do
source "$file"
done
add-zsh-hook -Uz chpwd _hook_glow
add-zsh-hook -Uz chpwd glow
add-zsh-hook -Uz chpwd osc7
add-zsh-hook -Uz precmd termtitle
add-zsh-hook -Uz precmd osc113

View File

@ -1,5 +1,5 @@
## Load readme with glow (if available)
_hook_glow() {
glow() {
has glow || return 0
find $PWD -maxdepth 1 -iname 'readme.md' -exec glow {} \;
}

View File

@ -15,8 +15,6 @@ zle -N history-beginning-search-backward-end \
history-search-end
zle -N history-beginning-search-forward-end \
history-search-end
zle -N bracketed-paste bracketed-paste-magic
zle -N self-insert url-quote-magic
[[ -n "${key[Home]}" ]] && bindkey "${key[Home]}" beginning-of-line
[[ -n "${key[End]}" ]] && bindkey "${key[End]}" end-of-line

8
prompt
View File

@ -11,16 +11,16 @@ autoload -Uz vcs_info
zstyle ':vcs_info:*' enable git
## Set icons for Staged and Unstaged Changes
zstyle ':vcs_info:git*' stagedstr "%{%F{green%}%}󰄳 %{%f%}"
zstyle ':vcs_info:git*' unstagedstr "%{%F{red%}%}󰅙 %{%f%}"
zstyle ':vcs_info:git*' stagedstr "%{%F{green%}%} %{%f%}"
zstyle ':vcs_info:git*' unstagedstr "%{%F{red%}%} %{%f%}"
## Enable check for changes (CPU-intensive)
## DISABLE THIS ON LOW POWER SYSTEMS
zstyle ':vcs_info:git*' check-for-changes true
## Set format for Repo Information
zstyle ':vcs_info:git*' formats "-(%{%F{203}%} %{%f%}%s:%{%F{2}%} %{%f%}%b %u%c)"
zstyle ':vcs_info:git*' actionformats "-(%{%F{203}%} %{%f%}%s:%{%F{2}%} %{%f%}%b %u%c)(%a)"
zstyle ':vcs_info:git*' formats "-(%{%F{203}%} %{%f%}%s:%{%F{2}%}שׂ %{%f%}%b %u%c)"
zstyle ':vcs_info:git*' actionformats "-(%{%F{203}%} %{%f%}%s:%{%F{2}%}שׂ %{%f%}%b %u%c)(%a)"
## do precmd stuff
_vcsinfo() {

32
theme
View File

@ -1,32 +0,0 @@
# Attempt to load pywal theme first (unless disabled)
if has 'wal' ; then
if [[ -z $NO_PYWAL ]]; then
if [[ -e $XDG_CACHE_HOME/wal/sequences ]]; then
cat $XDG_CACHE_HOME/wal/sequences && return
fi
wal -qnR && return
fi
fi
# Load theme.sh theme uses theme_history to set
if has 'theme.sh'; then
# Load the last set theme automatically
[ -e ~/.config/.theme_history ] && theme.sh "$(theme.sh -l|tail -n1)"
# Toggle between last set themes
last_theme() {
theme.sh "$(theme.sh -l | tail -n2 | head -n1)"
}
zle -N last_theme
bindkey '^o' last_theme
alias th='theme.sh -i'
alias thl='theme.sh --light -i'
alias thd='theme.sh --dark -i'
fi
# vim: ft=zsh

7
zshrc
View File

@ -14,8 +14,6 @@ autoload -U run-help
autoload -U +X compinit
autoload -U edit-command-line
autoload -U add-zsh-hook
autoload -U url-quote-magic
autoload -U bracketed-paste-magic
## zmodload Modules
zmodload zsh/complist
@ -37,7 +35,6 @@ source ${ZDOTDIR}/prompt
source ${ZDOTDIR}/keyboard
source ${ZDOTDIR}/history
source ${ZDOTDIR}/hooks
source ${ZDOTDIR}/theme
## Set options
@ -75,10 +72,6 @@ if [[ -d "/home/linuxbrew" ]]; then
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
fi
if [[ -f ${XDG_DATA_HOME:="$HOME/.local/share"}/ghcup/env ]]; then
source ${XDG_DATA_HOME:="$HOME/.local/share"}/ghcup/env
fi
## Configure Plugins
export ZSH_AUTOSUGGEST_STRATEGY=(completion history) # suggest from completion then history
export ZSH_AUTOSUGGEST_USE_ASYNC=1 # make async for SPEED