dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 643e9ed66b9eda08af099482aa98c0db29b9670d
parent 25a56e43382eb03caa59b4c2103cca58c8487e82
Author: Alex Balgavy <a.balgavy@gmail.com>
Date:   Thu, 25 Apr 2019 12:27:27 +0200

Rename "CONF_DIR" env var to "DOTFILES"


Former-commit-id: aa34f458c989decd662251642570f10c6a47bce6
Diffstat:
Minstall.sh | 2+-
Miterm2/com.googlecode.iterm2.plist | 2+-
Mscripts/conf | 46+++++++++++++++++++++++-----------------------
Mscripts/it-style | 4++--
Mshell/commonprofile | 4++--
Mvim/init.vimrc | 14+++++++-------
Mvim/map.vimrc | 16++++++++--------
Mvim/plugins.vimrc | 4++--
8 files changed, 46 insertions(+), 46 deletions(-)

diff --git a/install.sh b/install.sh @@ -31,7 +31,7 @@ fi #}}} -export CONF_DIR="$HOME/.dotfiles" +export DOTFILES="$HOME/.dotfiles" read -n 1 -p "Install all dotfiles? [Y/n]" yn echo diff --git a/iterm2/com.googlecode.iterm2.plist b/iterm2/com.googlecode.iterm2.plist @@ -689,7 +689,7 @@ <key>Columns</key> <integer>120</integer> <key>Command</key> - <string>/usr/local/bin/vim --cmd "let $CONF_DIR='/Users/alex/.dotfiles'"</string> + <string>/usr/local/bin/vim --cmd "let $DOTFILES='/Users/alex/.dotfiles'"</string> <key>Cursor Color</key> <dict> <key>Blue Component</key> diff --git a/scripts/conf b/scripts/conf @@ -39,56 +39,56 @@ use_files() { for f in "$@"; do case "${f##./}" in "bin") - lncommand "$CONF_DIR/bin" "$HOME/.bin" + lncommand "$DOTFILES/bin" "$HOME/.bin" ;; "ctags") - lncommand "$CONF_DIR/ctags/ctags" "$HOME/.ctags" + lncommand "$DOTFILES/ctags/ctags" "$HOME/.ctags" ;; "gdb") - lncommand "$CONF_DIR/gdb/gdbinit" "$HOME/.gdbinit" + lncommand "$DOTFILES/gdb/gdbinit" "$HOME/.gdbinit" ;; "git") - lncommand "$CONF_DIR/git/gitconfig" "$HOME/.gitconfig" + lncommand "$DOTFILES/git/gitconfig" "$HOME/.gitconfig" if [ -d git/git_template ]; then - conf_check git config --global init.templatedir "$CONF_DIR"/git/git_template + conf_check git config --global init.templatedir "$DOTFILES"/git/git_template fi ;; "iterm2") - lncommand "$CONF_DIR/iterm2" "$HOME/.iterm2" + lncommand "$DOTFILES/iterm2" "$HOME/.iterm2" ;; "karabiner") - lncommand "$CONF_DIR/karabiner" "$HOME/.config/karabiner" + lncommand "$DOTFILES/karabiner" "$HOME/.config/karabiner" ;; "newsboat") - lncommand "$CONF_DIR/newsboat" "$HOME/.newsboat" + lncommand "$DOTFILES/newsboat" "$HOME/.newsboat" ;; "oh-my-zsh") - lncommand "$CONF_DIR/oh-my-zsh" "$HOME/.oh-my-zsh" + lncommand "$DOTFILES/oh-my-zsh" "$HOME/.oh-my-zsh" ;; "radio") - lncommand "$CONF_DIR/radio/radio-config" "$HOME/.radio-config" + lncommand "$DOTFILES/radio/radio-config" "$HOME/.radio-config" ;; "ranger") - lncommand "$CONF_DIR/ranger" "$HOME/.config/ranger" + lncommand "$DOTFILES/ranger" "$HOME/.config/ranger" ;; "rtv") - lncommand "$CONF_DIR/rtv" "$HOME/.config/rtv" + lncommand "$DOTFILES/rtv" "$HOME/.config/rtv" ;; "scripts") - lncommand "$CONF_DIR/scripts" "$HOME/.scripts" + lncommand "$DOTFILES/scripts" "$HOME/.scripts" if command -v mpv &> /dev/null; then mkdir -p "$HOME/.config/mpv" - lncommand "$CONF_DIR/.scripts/visualizer.lua" "$HOME/.config/mpv/visualizer.lua" + lncommand "$DOTFILES/.scripts/visualizer.lua" "$HOME/.config/mpv/visualizer.lua" fi ;; "shell") for i in shell/*; do - lncommand "$CONF_DIR/$i" "$HOME/.${i##*/}" + lncommand "$DOTFILES/$i" "$HOME/.${i##*/}" done ;; "vim") - lncommand "$CONF_DIR/vim/init.vimrc" "$HOME/.vimrc" # vimrc points directly to other vim configs - lncommand "$CONF_DIR/vim/idea.vimrc" "$HOME/.ideavimrc" # ideavimrc has to be separate + lncommand "$DOTFILES/vim/init.vimrc" "$HOME/.vimrc" # vimrc points directly to other vim configs + lncommand "$DOTFILES/vim/idea.vimrc" "$HOME/.ideavimrc" # ideavimrc has to be separate ;; esac @@ -99,11 +99,11 @@ use_files() { } #}}} -# Check if $CONF_DIR is set {{{ +# Check if $DOTFILES is set {{{ conf_check() { - if [ -z "$CONF_DIR" ]; then - echo "\$CONF_DIR not set." - echo "Please set the CONF_DIR environment variable to your dotfiles repository." + if [ -z "$DOTFILES" ]; then + echo "\$DOTFILES not set." + echo "Please set the DOTFILES environment variable to your dotfiles repository." else "$@" fi @@ -139,13 +139,13 @@ if [ $# -gt 0 ]; then echo "File $HOME/.commonprofile does not exist." fi elif [ "$1" = 'get' ]; then - conf_check echo "$CONF_DIR" + conf_check echo "$DOTFILES" elif [ "$1" = 'use' ]; then conf_check use_files "${@:2}" else - conf_check "$(command -v git)" --git-dir="$CONF_DIR"/.git --work-tree "$CONF_DIR" "$@" + conf_check "$(command -v git)" --git-dir="$DOTFILES"/.git --work-tree "$DOTFILES" "$@" fi #}}} # ...or print help text {{{ diff --git a/scripts/it-style b/scripts/it-style @@ -74,12 +74,12 @@ while :; do # If there's no album, query without an album search_url="https://www.discogs.com/search/?q="$(sed -e 's/ /%20/g' -e 's/&/%26/g' <<< "${artist%%feat*} $name") echo "Querying: \"$artist $name\" ($search_url)" - response=$(ruby $CONF_DIR/scripts/it-style-helper.rb "${artist%%feat*}" "$name"); + response=$(ruby $DOTFILES/scripts/it-style-helper.rb "${artist%%feat*}" "$name"); else # Otherwise, add the album to query for precision search_url="https://www.discogs.com/search/?q="$(sed -e 's/ /%20/g' -e 's/&/%26/g' <<< "${artist%%feat*} $album") echo "Querying: \"$artist $album $name\" ($search_url)" - response=$(ruby $CONF_DIR/scripts/it-style-helper.rb "${artist%%feat*}" "$album"); + response=$(ruby $DOTFILES/scripts/it-style-helper.rb "${artist%%feat*}" "$album"); fi # Remove brackets from the Ruby array diff --git a/shell/commonprofile b/shell/commonprofile @@ -8,7 +8,7 @@ export \ PATH GOPATH \ - CONF_DIR MUSIC_DIR \ + DOTFILES MUSIC_DIR \ EDITOR HOMEBREW_EDITOR \ VIRTUALENVWRAPPER_PYTHON PIP_REQUIRE_VIRTUALENV \ CASK_REPO \ @@ -41,7 +41,7 @@ if [[ $PATH != *"/usr/local/sbin"* ]]; then fi # Set a variable for my confidr -CONF_DIR="$HOME/.dotfiles" +DOTFILES="$HOME/.dotfiles" # Where my music is located MUSIC_DIR="$HOME/Music/iTunes/iTunes Media/Music" diff --git a/vim/init.vimrc b/vim/init.vimrc @@ -1,7 +1,7 @@ -source $CONF_DIR/vim/general.vimrc -source $CONF_DIR/vim/editor.vimrc -source $CONF_DIR/vim/commands.vimrc -source $CONF_DIR/vim/map.vimrc -source $CONF_DIR/vim/plugins.vimrc -source $CONF_DIR/vim/autocmd.vimrc -source $CONF_DIR/vim/symbols.vimrc +source $DOTFILES/vim/general.vimrc +source $DOTFILES/vim/editor.vimrc +source $DOTFILES/vim/commands.vimrc +source $DOTFILES/vim/map.vimrc +source $DOTFILES/vim/plugins.vimrc +source $DOTFILES/vim/autocmd.vimrc +source $DOTFILES/vim/symbols.vimrc diff --git a/vim/map.vimrc b/vim/map.vimrc @@ -78,14 +78,14 @@ nnoremap gV `[v`] inoremap <C-Z> <ESC>:w<CR>a " Config edit mappings -nnoremap <C-E><C-A> :vsplit $CONF_DIR/vim/autocmd.vimrc<CR> -nnoremap <C-E><C-C> :vsplit $CONF_DIR/vim/commands.vimrc<CR> -nnoremap <C-E><C-E> :vsplit $CONF_DIR/vim/editor.vimrc<CR> -nnoremap <C-E><C-G> :vsplit $CONF_DIR/vim/general.vimrc<CR> -nnoremap <C-E><C-V> :vsplit $CONF_DIR/vim/init.vimrc<CR> -nnoremap <C-E><C-M> :vsplit $CONF_DIR/vim/map.vimrc<CR> -nnoremap <C-E><C-P> :vsplit $CONF_DIR/vim/plugins.vimrc<CR> -nnoremap <C-E><C-L> :vsplit $CONF_DIR/vim/pluginconf.vimrc<CR> +nnoremap <C-E><C-A> :vsplit $DOTFILES/vim/autocmd.vimrc<CR> +nnoremap <C-E><C-C> :vsplit $DOTFILES/vim/commands.vimrc<CR> +nnoremap <C-E><C-E> :vsplit $DOTFILES/vim/editor.vimrc<CR> +nnoremap <C-E><C-G> :vsplit $DOTFILES/vim/general.vimrc<CR> +nnoremap <C-E><C-V> :vsplit $DOTFILES/vim/init.vimrc<CR> +nnoremap <C-E><C-M> :vsplit $DOTFILES/vim/map.vimrc<CR> +nnoremap <C-E><C-P> :vsplit $DOTFILES/vim/plugins.vimrc<CR> +nnoremap <C-E><C-L> :vsplit $DOTFILES/vim/pluginconf.vimrc<CR> " Yank to clipboard nnoremap <leader>y "*y diff --git a/vim/plugins.vimrc b/vim/plugins.vimrc @@ -52,7 +52,7 @@ let g:tagbar_type_vimwiki = { \ , 'sro':'&&&' \ , 'kind2scope':{'h':'header'} \ , 'sort':0 - \ , 'ctagsbin':'$CONF_DIR/scripts/vwtags.py' + \ , 'ctagsbin':'$DOTFILES/scripts/vwtags.py' \ , 'ctagsargs': 'default' \ } @@ -155,7 +155,7 @@ Plug 'SirVer/ultisnips' let g:UltiSnipsExpandTrigger = '<tab>' let g:UltiSnipsJumpForwardTrigger = '<tab>' let g:UltiSnipsJumpBackwardTrigger = '<s-tab>' -let g:UltiSnipsSnippetDirectories = [$CONF_DIR.'/vim/ultisnips'] +let g:UltiSnipsSnippetDirectories = [$DOTFILES.'/vim/ultisnips'] let g:UltiSnipsEditSplit = "vertical" let g:vimwiki_table_mappings = 0 " avoid vimwiki conflict cabbrev USE UltiSnipsEdit