From 4d1a456f845fd44c0adcd0bf39baefc2720a5913 Mon Sep 17 00:00:00 2001 From: Kevin Mok Date: Thu, 1 Feb 2018 16:47:54 -0500 Subject: [PATCH] Deleted unnecessary dotfiles folder Moved all files into root folder of repository and fixed set-from-git to reflect that. I was able to get set-from-git to work without listing all the dotfiles, but it didn't work as planned due to swp files, git folder and others; it's just easier and cleaner to list out the files. --- dotfiles/.bashrc => .bashrc | 9 +-------- dotfiles/.gitconfig => .gitconfig | 0 dotfiles/.inputrc => .inputrc | 0 dotfiles/.vimrc => .vimrc | 2 +- {dotfiles/aliases => aliases}/.bash_aliases | 12 ++++++------ {dotfiles/aliases => aliases}/.git_aliases | 0 {dotfiles/aliases => aliases}/.laptop_aliases | 0 {dotfiles/aliases => aliases}/.pc_aliases | 0 {dotfiles/aliases => aliases}/.school_aliases | 0 dotfiles/set-from-git.sh | 17 ----------------- set-from-git.sh | 14 ++++++++++++++ dotfiles/termConfig => termConfig | 0 12 files changed, 22 insertions(+), 32 deletions(-) rename dotfiles/.bashrc => .bashrc (95%) rename dotfiles/.gitconfig => .gitconfig (100%) rename dotfiles/.inputrc => .inputrc (100%) rename dotfiles/.vimrc => .vimrc (97%) rename {dotfiles/aliases => aliases}/.bash_aliases (75%) rename {dotfiles/aliases => aliases}/.git_aliases (100%) rename {dotfiles/aliases => aliases}/.laptop_aliases (100%) rename {dotfiles/aliases => aliases}/.pc_aliases (100%) rename {dotfiles/aliases => aliases}/.school_aliases (100%) delete mode 100755 dotfiles/set-from-git.sh create mode 100755 set-from-git.sh rename dotfiles/termConfig => termConfig (100%) diff --git a/dotfiles/.bashrc b/.bashrc similarity index 95% rename from dotfiles/.bashrc rename to .bashrc index 2ba18b5..92b837e 100644 --- a/dotfiles/.bashrc +++ b/.bashrc @@ -96,14 +96,7 @@ fi # sleep 10; alert alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' -# Alias definitions. -# You may want to put all your additions into a separate file like -# ~/.bash_aliases, instead of adding them here directly. -# See /usr/share/doc/bash-doc/examples in the bash-doc package. - -if [ -f ~/.bash_aliases ]; then - . ~/.bash_aliases -fi +. ~/linux-config/aliases/.bash_aliases # enable programmable completion features (you don't need to enable # this, if it's already enabled in /etc/bash.bashrc and /etc/profile diff --git a/dotfiles/.gitconfig b/.gitconfig similarity index 100% rename from dotfiles/.gitconfig rename to .gitconfig diff --git a/dotfiles/.inputrc b/.inputrc similarity index 100% rename from dotfiles/.inputrc rename to .inputrc diff --git a/dotfiles/.vimrc b/.vimrc similarity index 97% rename from dotfiles/.vimrc rename to .vimrc index fc385c8..728dbad 100644 --- a/dotfiles/.vimrc +++ b/.vimrc @@ -12,6 +12,7 @@ set mouse=c set clipboard=unnamedplus autocmd VimResized * wincmd = +autocmd BufNewFile,BufRead .*_aliases set syntax=sh " 'h/u3/c7/05/mokkar/.vim/plugged' " '~/.vim/plugged' @@ -49,7 +50,6 @@ let g:UltiSnipsJumpForwardTrigger = "" let g:UltiSnipsJumpBackwardTrigger = "" call plug#end() - colorscheme gotham256 map :wa diff --git a/dotfiles/aliases/.bash_aliases b/aliases/.bash_aliases similarity index 75% rename from dotfiles/aliases/.bash_aliases rename to aliases/.bash_aliases index 25b652a..1b3ba10 100644 --- a/dotfiles/aliases/.bash_aliases +++ b/aliases/.bash_aliases @@ -1,7 +1,7 @@ -alias_folder="~/linux-config/dotfiles/aliases" +alias_folder="~/linux-config/aliases" alias_type="school git pc laptop" for type in $alias_type; do - . ~/linux-config/dotfiles/aliases/."$type"_aliases + . ~/linux-config/aliases/."$type"_aliases done # system @@ -29,10 +29,10 @@ vsnip() { vi ~/.vim/UltiSnips/"$1".snippets ; } ok() { okular $1 ; } # config -alias lc="d ~/linux-config/dotfiles" -alias lca="d ~/linux-config/dotfiles/aliases" -alias vb="vi ~/.bash_aliases" -alias vs="vi $alias_folder/.school_aliases" +alias lc="d ~/linux-config/" +alias lca="d ~/linux-config/aliases" +alias vb="vi \"$alias_folder\"/.bash_aliases" +alias vs="vi \"$alias_folder\"/.school_aliases" alias vv="vi ~/.vimrc" alias r=". ~/.bashrc" diff --git a/dotfiles/aliases/.git_aliases b/aliases/.git_aliases similarity index 100% rename from dotfiles/aliases/.git_aliases rename to aliases/.git_aliases diff --git a/dotfiles/aliases/.laptop_aliases b/aliases/.laptop_aliases similarity index 100% rename from dotfiles/aliases/.laptop_aliases rename to aliases/.laptop_aliases diff --git a/dotfiles/aliases/.pc_aliases b/aliases/.pc_aliases similarity index 100% rename from dotfiles/aliases/.pc_aliases rename to aliases/.pc_aliases diff --git a/dotfiles/aliases/.school_aliases b/aliases/.school_aliases similarity index 100% rename from dotfiles/aliases/.school_aliases rename to aliases/.school_aliases diff --git a/dotfiles/set-from-git.sh b/dotfiles/set-from-git.sh deleted file mode 100755 index 6f1d4a3..0000000 --- a/dotfiles/set-from-git.sh +++ /dev/null @@ -1,17 +0,0 @@ -dotDir=~/linux-config/dotfiles -# aliases -rm ~/.bash_aliases -ln -s $dotDir/aliases/.bash_aliases ~/.bash_aliases - -# home -for file in *; do - if [[ $file = .* ]]; then - rm ~/$file - ln -s $dotDir/$file ~/$file - fi -done - -# terminator -termDir=~/.config/terminator -rm $termDir/config -ln -s $dotDir/termConfig "$termDir"/config diff --git a/set-from-git.sh b/set-from-git.sh new file mode 100755 index 0000000..0a7d793 --- /dev/null +++ b/set-from-git.sh @@ -0,0 +1,14 @@ +dot_dir=~/linux-config + +# dotfiles +dotfiles="bashrc gitconfig inputrc vimrc" +cd $dot_dir +for dotfile in $dotfiles; do + rm ~/.$dotfile + ln -s $dot_dir/.$dotfile ~/.$dotfile +done + +# terminator +term_dir=~/.config/terminator +rm $term_dir/config +ln $dot_dir/termConfig "$term_dir"/config diff --git a/dotfiles/termConfig b/termConfig similarity index 100% rename from dotfiles/termConfig rename to termConfig