1
0
Fork 0

improve zsh performance

This commit is contained in:
Massaki Archambault 2018-10-18 11:11:55 -04:00
parent bc81036d85
commit b786237d27
13 changed files with 16 additions and 49 deletions

9
.gitmodules vendored
View File

@ -4,12 +4,9 @@
[submodule "files/.config/zsh/custom/plugins/zsh-syntax-highlighting"]
path = files/.config/zsh/custom/plugins/zsh-syntax-highlighting
url = https://github.com/zsh-users/zsh-syntax-highlighting.git
[submodule "files/.config/zsh/custom/plugins/zsh-autosuggestions"]
path = files/.config/zsh/custom/plugins/zsh-autosuggestions
url = https://github.com/zsh-users/zsh-autosuggestions.git
[submodule "files/.vim/bundle/repos/github.com/Shougo/dein.vim"]
path = files/.vim/bundle/repos/github.com/Shougo/dein.vim
url = https://github.com/Shougo/dein.vim.git
[submodule "files/.config/zsh/custom/plugins/history-search-multi-word"]
path = files/.config/zsh/custom/plugins/history-search-multi-word
url = https://github.com/zdharma/history-search-multi-word.git
[submodule "files/.config/zsh/custom/plugins/fast-syntax-highlighting"]
path = files/.config/zsh/custom/plugins/fast-syntax-highlighting
url = https://github.com/zdharma/fast-syntax-highlighting.git

View File

@ -8,10 +8,13 @@ alias http-server="python -m http.server"
alias rename="perl-rename"
alias userctl="systemctl --user"
# powershell seems to have trouble with xterm-256colors
# powershell seems to have trouble with xterm-256color
alias pwsh="TERM=xterm pwsh"
alias powershell="TERM=xterm pwsh"
# remote often does not have the correct terminfo for termite
alias ssh="TERM=xterm-256color ssh"
# network stuff must always be run with sudo anyway
alias wifi-menu="sudo wifi-menu -o"
alias netctl="sudo netctl"

View File

@ -1,26 +0,0 @@
ZSH_HIGHLIGHT_STYLES[default]="none"
ZSH_HIGHLIGHT_STYLES[unknown-token]="fg=red,bold"
ZSH_HIGHLIGHT_STYLES[reserved-word]="fg=yellow"
ZSH_HIGHLIGHT_STYLES[alias]="fg=white,bold"
ZSH_HIGHLIGHT_STYLES[builtin]="fg=magenta,bold"
ZSH_HIGHLIGHT_STYLES[function]="fg=white,bold"
ZSH_HIGHLIGHT_STYLES[command]="fg=white,bold"
ZSH_HIGHLIGHT_STYLES[precommand]="fg=yellow,bold"
ZSH_HIGHLIGHT_STYLES[commandseparator]="none"
ZSH_HIGHLIGHT_STYLES[hashed-command]="none"
ZSH_HIGHLIGHT_STYLES[path]="none"
ZSH_HIGHLIGHT_STYLES[globbing]="none"
ZSH_HIGHLIGHT_STYLES[history-expansion]="fg=blue"
ZSH_HIGHLIGHT_STYLES[single-hyphen-option]="fg=cyan"
ZSH_HIGHLIGHT_STYLES[double-hyphen-option]="fg=cyan,bold"
ZSH_HIGHLIGHT_STYLES[single-quoted-argument]="fg=green"
ZSH_HIGHLIGHT_STYLES[single-quoted-argument-unclosed]="fg=red,bold"
ZSH_HIGHLIGHT_STYLES[double-quoted-argument]="fg=green"
ZSH_HIGHLIGHT_STYLES[double-quoted-argument-unclosed]="fg=red,bold"
ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]="fg=yellow"
ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]="fg=yellow"
#ZSH_HIGHLIGHT_STYLES[assign]="none"
HSMW_HIGHLIGHT_STYLES=("${(@kvf)ZSH_HIGHLIGHT_STYLES}")
FAST_HIGHLIGHT_STYLES=("${(@kvf)ZSH_HIGHLIGHT_STYLES}")

View File

@ -1,7 +0,0 @@
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=0"
ZSH_AUTOSUGGEST_STRATEGY="match_prev_cmd"
#ZSH_AUTOSUGGEST_USE_ASYNC=1
ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20
bindkey '^ ' autosuggest-accept

@ -0,0 +1 @@
Subproject commit 2a0a685922fb60a227732b432ffc17777eaafa3b

@ -1 +0,0 @@
Subproject commit 2a593787b2645c941c6aabfabca7dfd00721d56b

@ -1 +0,0 @@
Subproject commit c7d4a85031c101ef9bce0018096622087894dd09

@ -1 +1 @@
Subproject commit e4fffa4de566c9552f9284fd75e689edb3a1083d
Subproject commit 47c2b7e1851375c3a9d3c1faec5851fc8409da08

@ -1 +1 @@
Subproject commit 0cec4626219bfd5a163986ebe3745fc31b593446
Subproject commit 54603333634d057c5d2e1b2eb826eec5ce8fd706

View File

@ -1,9 +1,9 @@
#!/bin/bash -e
api_response="$(curl -sS https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY)"
filename="$HOME/Pictures/apod/$(echo $api_response | jq --join-output '.date+" "+.title').jpg"
filename="$HOME/Pictures/apod/$(echo -n $api_response | jq --join-output '.date+" "+.title').jpg"
wallpaper_filename="$HOME/Pictures/wallpaper"
url="$(echo $api_response | jq --raw-output '.hdurl')"
url="$(echo -n $api_response | jq --raw-output '.hdurl')"
screen_size="$(xrandr --screen 0 | grep '^Screen' | grep -Eo 'current [0-9]+ x [0-9]+' | sed -E 's/current ([0-9]+) x ([0-9]+)/\1x\2/g')"
mkdir -p "$(dirname $filename)"

View File

@ -7,6 +7,7 @@ export BROWSER=firefox
export VISUAL=nvim
export EDITOR=nvim
export PAGER=less
export DIFFPROG=meld
# motd
export MOTD_SERVICES="$MOTD_SERVICES docker.socket"

@ -1 +1 @@
Subproject commit ec5a35ce0b4dc954d278a1bb29d96ef118e96a29
Subproject commit 8eae0257d1e05a6fc11dc6742585bf198c52ccc2

View File

@ -35,7 +35,7 @@ DISABLE_AUTO_UPDATE="true"
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
ENABLE_CORRECTION="true"
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"
@ -57,7 +57,7 @@ ZSH_CUSTOM="$HOME/.config/zsh/custom/"
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git archlinux tmux thefuck zsh-autosuggestions history-search-multi-word zsh-syntax-highlighting)
plugins=(git archlinux tmux thefuck fzf fast-syntax-highlighting)
source $ZSH/oh-my-zsh.sh