commit 9d4a0e14590aaec2d07326c867fa0d59cb64bb0f
parent b9b7dbb3017b1bf8ce073e4cfadc20231ef181f0
Author: Cody Lewis <cody@codymlewis.com>
Date: Wed, 24 Jun 2020 14:54:39 +1000
Updated zshrc and vimrc
Diffstat:
8 files changed, 62 insertions(+), 19 deletions(-)
diff --git a/.gitattributes b/.gitattributes
@@ -0,0 +1 @@
+*.png binary
diff --git a/.gitignore b/.gitignore
@@ -35,3 +35,5 @@ ncmpcpp/error.log
mpd/state
mpd/log
mpd/database
+Android Open Source Project/
+QtProject.conf
diff --git a/mpv/input.conf b/mpv/input.conf
@@ -1,3 +1,5 @@
l seek 5
j seek -5
k cycle pause
+c cycle sub
+C cycle sub down
diff --git a/mpv/mpv.conf b/mpv/mpv.conf
@@ -1 +1,3 @@
hwdec=vaapi
+sub-auto=fuzzy
+ytdl-raw-options=sub-format=en,write-srt=
diff --git a/vim/vimrc b/vim/vimrc
@@ -62,6 +62,8 @@ endif
let g:badwolf_darkgutter = 1
colorscheme badwolf
+let g:tex_conceal = ""
+
nmap <return> :Obsess!<CR>
" General config
@@ -104,10 +106,10 @@ set autoindent
set smartindent
set wrap
-map <tab> :tabnext<CR>
-map <s-tab> :tabprev<CR>
-map <c-t> :Texplore<CR>
-map <c-w> :tabclose<CR>
+map <tab> :bnext<CR>
+map <s-tab> :bprevious<CR>
+map <f9> :Explore<CR>
+map <f10> :buffer<space>
map <f5> :make<CR>
map <f2> :set paste!<CR>
diff --git a/wallpaper.png b/wallpaper.png
Binary files differ.
diff --git a/zsh/.zprofile b/zsh/.zprofile
@@ -8,8 +8,15 @@ export XDG_CONFIG_HOME="$HOME.config"
export XDG_USER_CONFIG_DIR="$XDG_CONFIG_HOME"
export PATH="$HOME.local/bin:$PATH"
export HISTFILE="$XDG_CONFIG_HOME"/zsh/history
+export HISTFILESIZE=1000000000
+export HISTSIZE=1000000000
+export SAVEHIST=1000000000
export VIMINIT=":source $XDG_CONFIG_HOME"/vim/vimrc
export ASPELL_CONF="per-conf $XDG_CONFIG_HOME/aspell/aspell.conf; personal $XDG_CONFIG_HOME/aspell/en.pws; repl $XDG_CONFIG_HOME/aspell/en.prepl"
+export ANDROID_HOME="$HOME/Android/Sdk"
+export ANDROID_NDK_ROOT="$ANDROID_HOME/ndk/21.1.6352462/"
+export ANDROIDAPI="26"
+# export NDKAPI="21"
[ -d "$HOME.nvm" ] && export NVM_DIR="$HOME/.nvm" && \
[ -s "$NVM_DIR/nvm.sh" ] && \. "NVM_DIR/nvm.sh"
@@ -22,6 +29,7 @@ export ASPELL_CONF="per-conf $XDG_CONFIG_HOME/aspell/aspell.conf; personal $XDG_
pgrep 'tmux' > /dev/null ||
(tmux new-session -d 'nvim ~/Desktop/dash.md' &&
- tmux new-window 'ncmpcpp' && tmux next-window)
+ tmux new-window 'ncmpcpp' &&
+ tmux next-window)
pgrep 'mpd' > /dev/null || mpd ~/.config/mpd/mpd.conf &
pgrep 'startx' > /dev/null || startx
diff --git a/zsh/.zshrc b/zsh/.zshrc
@@ -1,17 +1,27 @@
#!/usr/bin/env zsh
-source "$ZDOTDIR/antigen.zsh"
+zmodload zsh/complist
+autoload -Uz compinit
+compinit
+setopt COMPLETE_ALIASES
+zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
+zstyle ':completion:*' completer _expand _complete _ignored _approximate _prefix
+zstyle ':completion:*' menu select=2
-antigen use oh-my-zsh
+autoload -Uz up-line-or-beginning-search down-line-or-beginning-search
+zle -N up-line-or-beginning-search
+zle -N down-line-or-beginning-search
-antigen bundle wd
-antigen bundle sudo
+setopt INC_APPEND_HISTORY
+setopt EXTENDED_HISTORY
+setopt SHARE_HISTORY
-antigen theme norm
+[[ -n "${key[Up]}" ]] && bindkey -- "${key[Up]}" up-line-or-beginning-search
+[[ -n "${key[Down]}" ]] && bindkey -- "${key[Down]}" down-line-or-beginning-search
-antigen apply
+export PROMPT="%F{green}%n%f%F{yellow}@%f%B%F{blue}%m%b%f %F{magenta}%~%f %F{red}%#%f "
-alias wd="wd --config ~/.config/zsh/warprc"
+bindkey -e
alias ls="ls -hN --color=auto --group-directories-first"
alias sl="ls"
@@ -40,6 +50,8 @@ alias .....="cd ../../../../"
alias tmuxcon='tmux -q has-session && exec tmux attach-session -d || exec tmux new-session -n"$USER" -s"$USER"@"$HOSTNAME"'
bindkey -s '^N' 'ncmpcpp\n'
bindkey -s '^P' 'f=$(fzf) && open "$f"\n'
+bindkey -s "^V" 'pulsemixer\n'
+bindkey -s "^Z" 'fzfmpc\n'
open () {
for a in $@; do
@@ -53,13 +65,6 @@ open () {
alias yd="youtube-dl -ic --add-metadata -f 'bestvideo+bestaudio/best'" # Download video link
alias yda="youtube-dl -x -f bestaudio/best" # Download only audio
-ydall () {
- olddir=$(pwd)
- cd $HOME/Videos
- youtube-dl $@ -ic --add-metadata -f 'bestvideo+bestaudio/best' 'https://www.youtube.com/playlist?list=PLtrReXASdY_GciC24eqggMeQ0xgHsTZKY'
- cd "$olddir"
-}
-
gdoc () {
refer -PS -e -p "$HOME/Groff/bibliography" "$1.ms" | \
groff -ms -e -m "$HOME/Groff/macros" -T pdf > "$1.pdf"
@@ -88,4 +93,25 @@ b () {
u "$HOME/mnt/backup"
}
+wd () {
+ config="$HOME/.config/zsh/warprc"
+ case $1 in
+ "list")
+ sed 's/ / -> /' "$config"
+ ;;
+ "add")
+ printf "%s %s\n" "$2" "$PWD" >> "$config"
+ ;;
+ "rm")
+ temp=$(grep -v "$2"\\s "$config")
+ echo "$temp" > "$config"
+ ;;
+ *)
+ wp=$(grep -m1 "$1[[:space:]]" "$config" | awk '{ print $2 }')
+ cd "$wp" || \
+ (echo "Could not warp to point $1" && exit)
+ ;;
+ esac
+}
+
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh