Compare commits
9 Commits
9da7b6babf
...
9392c2eb19
| Author | SHA1 | Date | |
|---|---|---|---|
| 9392c2eb19 | |||
| 169cf0c209 | |||
| 0100d1c64f | |||
| 654a2ad327 | |||
| 2ad568db03 | |||
| cd0ec0c563 | |||
| 6a7f432e33 | |||
| 1a18c13306 | |||
| 08539a0de6 |
7
aliases
7
aliases
|
|
@ -34,7 +34,10 @@
|
|||
|
||||
## Use Exa instead of ls
|
||||
## REQUIRES NERD FONT
|
||||
has exa && alias ls='exa --icons --group-directories-first'
|
||||
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
|
||||
|
||||
## Shorten xdg-open
|
||||
has xdg-open && alias xopen='xdg-open'
|
||||
|
|
@ -72,6 +75,8 @@ 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 #
|
||||
|
|
|
|||
|
|
@ -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="$HOME/Projects"
|
||||
hash -d pr="${Z_PROJECT_DIR:-$HOME/Projects}"
|
||||
# vim: ft=zsh
|
||||
|
|
|
|||
1
greet
1
greet
|
|
@ -15,3 +15,4 @@ if [ -d "$HOME/tmp" ]; then
|
|||
fi
|
||||
has randomVerse && randomVerse
|
||||
has colours.sh && colours.sh
|
||||
has glow && [ -f ~/TODO.md ] && glow ~/TODO.md
|
||||
|
|
|
|||
2
hooks
2
hooks
|
|
@ -3,7 +3,7 @@ for file in $(find $ZDOTDIR/hooks.d -type f); do
|
|||
source "$file"
|
||||
done
|
||||
|
||||
add-zsh-hook -Uz chpwd glow
|
||||
add-zsh-hook -Uz chpwd _hook_glow
|
||||
add-zsh-hook -Uz chpwd osc7
|
||||
add-zsh-hook -Uz precmd termtitle
|
||||
add-zsh-hook -Uz precmd osc113
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
## Load readme with glow (if available)
|
||||
glow() {
|
||||
_hook_glow() {
|
||||
has glow || return 0
|
||||
find $PWD -maxdepth 1 -iname 'readme.md' -exec glow {} \;
|
||||
}
|
||||
|
|
|
|||
2
keyboard
2
keyboard
|
|
@ -15,6 +15,8 @@ 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
8
prompt
|
|
@ -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
Normal file
32
theme
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# 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
7
zshrc
|
|
@ -14,6 +14,8 @@ 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
|
||||
|
|
@ -35,6 +37,7 @@ source ${ZDOTDIR}/prompt
|
|||
source ${ZDOTDIR}/keyboard
|
||||
source ${ZDOTDIR}/history
|
||||
source ${ZDOTDIR}/hooks
|
||||
source ${ZDOTDIR}/theme
|
||||
|
||||
|
||||
## Set options
|
||||
|
|
@ -72,6 +75,10 @@ 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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user