summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2020-11-19 09:21:04 -0500
committerLuke Smith <luke@lukesmith.xyz>2020-11-19 09:21:04 -0500
commitae2f08ec697643f9a6978e6c59d0173e88497211 (patch)
treeb2f4bd9e8de4df50810222a473e563957f0353f1
parent8983f6aeb4bc343ed61f3981334c30f434a42626 (diff)
downloadeibhear-ae2f08ec697643f9a6978e6c59d0173e88497211.tar.gz
eibhear-ae2f08ec697643f9a6978e6c59d0173e88497211.tar.zst
eibhear-ae2f08ec697643f9a6978e6c59d0173e88497211.zip
minor updates
-rw-r--r--.config/nvim/init.vim48
-rw-r--r--.config/shell/profile13
-rw-r--r--.config/zsh/.zshrc5
3 files changed, 51 insertions, 15 deletions
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
index 8deb34a..bf982c1 100644
--- a/.config/nvim/init.vim
+++ b/.config/nvim/init.vim
@@ -19,11 +19,16 @@ Plug 'tpope/vim-commentary'
Plug 'ap/vim-css-color'
call plug#end()
+set title
set bg=light
set go=a
set mouse=a
set nohlsearch
set clipboard+=unnamedplus
+set noshowmode
+set noruler
+set laststatus=0
+set noshowcmd
" Some basics:
nnoremap c "_c
@@ -36,13 +41,12 @@ set clipboard+=unnamedplus
set wildmode=longest,list,full
" Disables automatic commenting on newline:
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
-
+" Perform dot commands over visual blocks:
+ vnoremap . :normal .<CR>
" Goyo plugin makes text more readable when writing prose:
map <leader>f :Goyo \| set bg=light \| set linebreak<CR>
-
" Spell-check set to <leader>o, 'o' for 'orthography':
map <leader>o :setlocal spell! spelllang=en_us<CR>
-
" Splits open at the bottom and right, which is non-retarded, unlike vim defaults.
set splitbelow splitright
@@ -56,11 +60,11 @@ set clipboard+=unnamedplus
endif
" vimling:
- nm <leader>d :call ToggleDeadKeys()<CR>
- imap <leader>d <esc>:call ToggleDeadKeys()<CR>a
- nm <leader>i :call ToggleIPA()<CR>
- imap <leader>i <esc>:call ToggleIPA()<CR>a
- nm <leader>q :call ToggleProse()<CR>
+ nm <leader><leader>d :call ToggleDeadKeys()<CR>
+ imap <leader><leader>d <esc>:call ToggleDeadKeys()<CR>a
+ nm <leader><leader>i :call ToggleIPA()<CR>
+ imap <leader><leader>i <esc>:call ToggleIPA()<CR>a
+ nm <leader><leader>q :call ToggleProse()<CR>
" Shortcutting split navigation, saving a keypress:
map <C-h> <C-w>h
@@ -72,7 +76,7 @@ set clipboard+=unnamedplus
map Q gq
" Check file in shellcheck:
- map <leader>s :!clear && shellcheck %<CR>
+ map <leader>s :!clear && shellcheck -x %<CR>
" Open my bibliography file in split
map <leader>b :vsp<space>$BIB<CR>
@@ -109,14 +113,36 @@ set clipboard+=unnamedplus
" Automatically deletes all trailing whitespace and newlines at end of file on save.
autocmd BufWritePre * %s/\s\+$//e
- autocmd BufWritepre * %s/\n\+\%$//e
+ autocmd BufWritePre * %s/\n\+\%$//e
" When shortcut files are updated, renew bash and ranger configs with new material:
autocmd BufWritePost bm-files,bm-dirs !shortcuts
" Run xrdb whenever Xdefaults or Xresources are updated.
- autocmd BufWritePost *Xresources,*Xdefaults,*xresources,*xdefaults !xrdb %
+ autocmd BufRead,BufNewFile xresources,xdefaults set filetype=xdefaults
+ autocmd BufWritePost Xresources,Xdefaults,xresources,xdefaults !xrdb %
+" Recompile dwmblocks on config edit.
+ autocmd BufWritePost ~/.local/src/dwmblocks/config.h !cd ~/.local/src/dwmblocks/; sudo make install && { killall -q dwmblocks;setsid -f dwmblocks }
" Turns off highlighting on the bits of code that are changed, so the line that is changed is highlighted but the actual text that has changed stands out on the line and is readable.
if &diff
highlight! link DiffText MatchParen
endif
+
+" Function for toggling the bottom statusbar:
+let s:hidden_all = 1
+function! ToggleHiddenAll()
+ if s:hidden_all == 0
+ let s:hidden_all = 1
+ set noshowmode
+ set noruler
+ set laststatus=0
+ set noshowcmd
+ else
+ let s:hidden_all = 0
+ set showmode
+ set ruler
+ set laststatus=2
+ set showcmd
+ endif
+endfunction
+nnoremap <leader>h :call ToggleHiddenAll()<CR>
diff --git a/.config/shell/profile b/.config/shell/profile
index 9ff1dc0..51ed62a 100644
--- a/.config/shell/profile
+++ b/.config/shell/profile
@@ -8,16 +8,18 @@
# Adds `~/.local/bin` to $PATH
export PATH="$PATH:$(du "$HOME/.local/bin" | cut -f2 | paste -sd ':')"
+unsetopt PROMPT_SP
+
# Default programs:
export EDITOR="nvim"
export TERMINAL="st"
export BROWSER="brave"
-export READER="zathura"
# ~/ Clean-up:
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CACHE_HOME="$HOME/.cache"
+#export XINITRC="${XDG_CONFIG_HOME:-$HOME/.config}/x11/xinitrc"
#export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" # This line will break some DMs.
export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/notmuch-config"
export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0"
@@ -25,7 +27,8 @@ export LESSHISTFILE="-"
export WGETRC="${XDG_CONFIG_HOME:-$HOME/.config}/wget/wgetrc"
export INPUTRC="${XDG_CONFIG_HOME:-$HOME/.config}/shell/inputrc"
export ZDOTDIR="${XDG_CONFIG_HOME:-$HOME/.config}/zsh"
-#export GNUPGHOME="$XDG_DATA_HOME/gnupg"
+#export ALSA_CONFIG_PATH="$XDG_CONFIG_HOME/alsa/asoundrc"
+#export GNUPGHOME="${XDG_DATA_HOME:-$HOME/.local/share}/gnupg"
export WINEPREFIX="${XDG_DATA_HOME:-$HOME/.local/share}/wineprefixes/default"
export KODI_DATA="${XDG_DATA_HOME:-$HOME/.local/share}/kodi"
export PASSWORD_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/password-store"
@@ -100,11 +103,17 @@ ex=🎯:\
*.ogg=🎵:\
*.m4a=🎵:\
*.flac=🎼:\
+*.wav=🎼:\
*.mkv=🎥:\
*.mp4=🎥:\
*.webm=🎥:\
*.mpeg=🎥:\
*.avi=🎥:\
+*.mov=🎥:\
+*.mpg=🎥:\
+*.wmv=🎥:\
+*.m4b=🎥:\
+*.flv=🎥:\
*.zip=📦:\
*.rar=📦:\
*.7z=📦:\
diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc
index e85b56c..d6b3cc8 100644
--- a/.config/zsh/.zshrc
+++ b/.config/zsh/.zshrc
@@ -5,10 +5,11 @@ autoload -U colors && colors # Load colors
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
setopt autocd # Automatically cd into typed directory.
stty stop undef # Disable ctrl-s to freeze terminal.
+setopt interactive_comments
# History in cache directory:
-HISTSIZE=10000
-SAVEHIST=10000
+HISTSIZE=10000000
+SAVEHIST=10000000
HISTFILE=~/.cache/zsh/history
# Load aliases and shortcuts if existent.