diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 65883d7..ce0db87 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -113,13 +113,13 @@ set noshowcmd " 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 *.[ch] %s/\%$/\r/e + autocmd BufWritePre * %s/\n\+\%$//e + autocmd BufWritePre *.[ch] %s/\%$/\r/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 BufRead,BufNewFile xresources,xdefaults set filetype=xdefaults + autocmd BufRead,BufNewFile Xresources,Xdefaults,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 } diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc index 6ad7a8b..107ecb8 100644 --- a/.config/shell/aliasrc +++ b/.config/shell/aliasrc @@ -6,6 +6,11 @@ # Use $XINITRC variable if file exists. [ -f "$XINITRC" ] && alias startx="startx $XINITRC" +# sudo not required for some system commands +for x in mount umount sv pacman updatedb su ; do + alias $x="sudo $x" +done + # Verbosity and settings that you pretty much just always are going to want. alias \ cp="cp -iv" \ @@ -31,7 +36,6 @@ alias \ trem="transmission-remote" \ YT="youtube-viewer" \ sdn="sudo shutdown -h now" \ - f="$FILE" \ e="$EDITOR" \ v="$EDITOR" \ p="sudo pacman" \ diff --git a/.config/shell/profile b/.config/shell/profile index d075418..9515179 100644 --- a/.config/shell/profile +++ b/.config/shell/profile @@ -40,6 +40,8 @@ export ANSIBLE_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/ansible/ansible.cfg" export UNISON="${XDG_DATA_HOME:-$HOME/.local/share}/unison" export HISTFILE="${XDG_DATA_HOME:-$HOME/.local/share}/history" export WEECHAT_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/weechat" +export MBSYNCRC="${XDG_CONFIG_HOME:-$HOME/.config}/mbsync/config" +export ELECTRUMDIR="${XDG_DATA_HOME:-$HOME/.local/share}/electrum" # Other program settings: export DICS="/usr/share/stardict/dic/"