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 . " Goyo plugin makes text more readable when writing prose: map f :Goyo \| set bg=light \| set linebreak - " Spell-check set to o, 'o' for 'orthography': map o :setlocal spell! spelllang=en_us - " 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 d :call ToggleDeadKeys() - imap d :call ToggleDeadKeys()a - nm i :call ToggleIPA() - imap i :call ToggleIPA()a - nm q :call ToggleProse() + nm d :call ToggleDeadKeys() + imap d :call ToggleDeadKeys()a + nm i :call ToggleIPA() + imap i :call ToggleIPA()a + nm q :call ToggleProse() " Shortcutting split navigation, saving a keypress: map h @@ -72,7 +76,7 @@ set clipboard+=unnamedplus map Q gq " Check file in shellcheck: - map s :!clear && shellcheck % + map s :!clear && shellcheck -x % " Open my bibliography file in split map b :vsp$BIB @@ -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 h :call ToggleHiddenAll() 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.