commit 2c4e8ebdd78427d749668ef5327a1d227ec8393f
parent 3faeb14bfe43ccf0f4867792722fa4c6eb39c6cb
Author: Bharatvaj H <bharatvaj@yahoo.com>
Date: Mon, 2 Aug 2021 02:04:30 +0530
Partially modified .profile to conform to XDG spec
Diffstat:
11 files changed, 42 insertions(+), 61 deletions(-)
diff --git a/.bash_aliases b/.bash_aliases
@@ -0,0 +1,2 @@
+alias startx="startx \"$XDG_CONFIG_HOME/X11/xinitrc\" -- \"$XDG_CONFIG_HOME/X11/xserverrc\" vt1"
+alias wget="wget --hsts-file=\"$XDG_CACHE_HOME/wget-hsts\""
diff --git a/.bash_profile b/.bash_profile
@@ -4,6 +4,7 @@
[ -f ~/.profile ] && . ~/.profile
[ -f ~/.personal/config ] && . ~/.personal/config
[ -f ~/.bashrc ] && . ~/.bashrc
+[ -f ~/.bash_aliases ] && . ~/.bash_aliases
# Zoho
[ -f ~/.zoho/zoho ] && . ~/.zoho/zoho
diff --git a/.bashrc b/.bashrc
@@ -10,7 +10,7 @@ PATH_EXPORTS=( "${ESSENTIAL_PATH_EXPORTS[@]}" "${OTHER_PATH_EXPORTS[@]}" )
# Include one by one even if it affects performance
# If something fails, atleast others will be added to path
for PATH_EXPORT in ${PATH_EXPORTS}; do
- export PATH="$WASMTIME_HOME/bin:$PATH"
+ export PATH="${PATH_EXPORT}:${PATH}"
done
# Git
diff --git a/.Xdefaults b/.config/X11/Xresources
diff --git a/.xinitrc b/.config/X11/xinitrc
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
@@ -0,0 +1,3 @@
+set runtimepath^=$XDG_CONFIG_HOME/vim/.vimrc runtimepath+=$XDG_CONFIG_HOME/vim/after
+let &packpath=&runtimepath
+" source $XDG_CONFIG_HOME/vim/.vimrc
diff --git a/.config/user-dirs.dirs b/.config/user-dirs.dirs
@@ -0,0 +1,8 @@
+XDG_DESKTOP_DIR="$HOME/Desktop"
+XDG_DOCUMENTS_DIR="$HOME/Documents"
+XDG_DOWNLOAD_DIR="$HOME/downloads"
+XDG_MUSIC_DIR="$HOME/Music"
+XDG_PICTURES_DIR="$HOME/Pictures"
+XDG_PUBLICSHARE_DIR="$HOME/Public"
+XDG_TEMPLATES_DIR="$HOME/Templates"
+XDG_VIDEOS_DIR="$HOME/Videos"
diff --git a/.config/wgetrc b/.config/wgetrc
diff --git a/.gitignore b/.gitignore
@@ -4,10 +4,16 @@
# Git
!.gitignore
+# Shell
+!.profile
+
# Bash
!.bashrc
!.bash_local
!.bash_logout
-!.profile
+!.bash_aliases
+
+# Config
+!.config/
diff --git a/.profile b/.profile
@@ -1,18 +1,28 @@
-alias ls='ls -G'
export GREP_OPTIONS='--color=auto'
export GREP_COLOR='1;35;40'
# XDG
-export XDG_DATA_HOME="${HOME}"/.config
-export GNUPGHOME="$XDG_DATA_HOME"/gnupg
+export XDG_DATA_HOME="$HOME/.local/share"
+export XDG_CONFIG_HOME="$HOME/.config"
+export XDG_CACHE_HOME="$HOME/.cache"
+export GNUPGHOME="$XDG_DATA_HOME/gnupg"
+export VIMINIT='source $XDG_CONFIG_HOME/vim/vimrc'
+export LESSHISTFILE=-
+export NODE_REPL_HISTORY="$XDG_DATA_HOME"/node_repl_history
+export NPM_CONFIG_USERCONFIG=$XDG_CONFIG_HOME/npm/npmrc
+export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass
+export PSQLRC="$XDG_CONFIG_HOME/pg/psqlrc"
+export PSQL_HISTORY="$XDG_CACHE_HOME/pg/psql_history"
+export PGPASSFILE="$XDG_CONFIG_HOME/pg/pgpass"
+export PGSERVICEFILE="$XDG_CONFIG_HOME/pg/pg_service.conf"
+export RUSTUP_HOME="$XDG_DATA_HOME"/rustup
+export HISTFILE="$XDG_DATA_HOME"/bash/history
+export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc
+export XSERVERRC="$XDG_CONFIG_HOME"/X11/xserverrc
+export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority
+export ATOM_HOME="$XDG_DATA_HOME"/atom
+export WGETRC="$XDG_CONFIG_HOME/wgetrc"
# Setup editor
export EDITOR=vim
-# Export only the essentials here
-export JOPLIN_BIN="${HOME}"/.joplin-bin/bin
-
-export ESSENTIAL_PATH_EXPORTS=(
- "${JOPLIN_BIN}"
-)
-
diff --git a/.vimrc b/.vimrc
@@ -1,49 +0,0 @@
-set number
-set mouse=a
-syntax on
-set exrc
-
-" Search
-set hlsearch
-set incsearch
-
-" Anti-tab
-filetype plugin indent on
-set tabstop=4
-set shiftwidth=4
-set expandtab
-
-" Netrw customization
-let g:netrw_banner = 0
-
-
-" Plugin Management
-let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
-if empty(glob(data_dir . '/autoload/plug.vim'))
- silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
- autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
-endif
-call plug#begin('~/.vim/plugged')
- Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
- Plug 'junegunn/fzf.vim'
- Plug 'cdelledonne/vim-cmake'
- Plug 'editorconfig/editorconfig-vim'
- Plug 'vim-airline/vim-airline'
- Plug 'lifepillar/vim-solarized8'
- Plug 'tpope/vim-fugitive'
- Plug 'airblade/vim-gitgutter'
-call plug#end()
-
-
-" Plugin Keybindings
-nmap <Leader>f :GFiles<CR>
-nmap <Leader>F :Files<CR>
-nnoremap <leader>t :tabnew<cr>
-
-" Theming Begin
-" Git Gutter
-highlight GitGutterAdd ctermfg=green
-highlight GitGutterChange ctermfg=yellow
-highlight GitGutterDelete ctermfg=red
-highlight GitGutterChangeDelete ctermfg=yellow
-" Theming End