commit e177ed469fc640bb5d62486cadf2686962dd7006
parent 064cb99db779f2ab7308014b63419b0ce06fff5a
Author: Bharatvaj <bharatvaj@yahoo.com>
Date: Fri, 14 Jan 2022 04:44:13 +0530
Added nowrapsearch in vim config
Git aliases have been moved over to git/config. This change has been made
so that aliases don't conflict with the system executables. Annoying
result of this is typing 'g ds' instead of 'gds' for staged diffs.
clear is aliased to cls for posix shell for convenience.
Added some extra XDG related paths to .profile from Arch wiki.
.gitignore has been sorted this time, I was testing the :sort command from vim.
Diffstat:
9 files changed, 72 insertions(+), 47 deletions(-)
diff --git a/.config/.gitignore b/.config/.gitignore
@@ -2,21 +2,23 @@
*
!.gitignore
+!X11
!alacritty/
!alacritty/**
!bash/
!bash/**
-!sh/
-!sh/**
+!git/
+!git/config
!i3
-!nvim
-!vim/
-!vim/**
-!X11
-!wgetrc
!lynx/
!lynx/lynx.cfg
!lynx/lynx.lss
+!nvim
+!sh/
+!sh/**
!tmux/
!tmux/*
!user-dirs.dirs
+!vim/
+!vim/**
+!wgetrc
diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml
@@ -5,13 +5,4 @@ import:
- ~/.config/alacritty/theme.yml
- ~/.config/alacritty/font.yml
-cursor:
- style:
- shape: Beam
-
live_config_reload: true
-
-shell:
- program: bash
- args:
- - --login
diff --git a/.config/bash/bashrc b/.config/bash/bashrc
@@ -1,3 +1,5 @@
+set -o vi
+
PATH_EXPORTS=( "${ESSENTIAL_PATH_EXPORTS[@]}" "${OTHER_PATH_EXPORTS[@]}" )
export PATH="${PATH}:${PATH_EXPORTS[*]}"
diff --git a/.config/git/config b/.config/git/config
@@ -0,0 +1,23 @@
+[alias]
+ a = add
+ b = branch
+ ba = branch --all
+ c = commit
+ cm = commit --message
+ co = checkout
+ d = diff
+ ds = diff --staged
+ ld = log --pretty=format:"%h %ad %s" --date=short --all
+ lg = log --graph --oneline --decorate --all
+ p = pull
+ st = status
+ wt = worktree
+
+[difftool]
+ prompt = false
+
+[init]
+ defaultBranch = main
+
+[include]
+ path = config.user
diff --git a/.config/sh/aliases b/.config/sh/aliases
@@ -2,13 +2,14 @@ mich abook && alias abook='abook --config "$XDG_CONFIG_HOME"/abook/abookrc --dat
mich startx && alias startx='startx "$XDG_CONFIG_HOME/X11/xinitrc" vt1'
mich wget && alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"'
mich mbsync && alias mbsync='mbsync -c "$XDG_CONFIG_HOME"/isync/mbsyncrc'
-mich nvim && alias vim=nvim
mich emcc && alias emcc='emcc --em-config "$XDG_CONFIG_HOME"/emscripten/config --em-cache "$XDG_CACHE_HOME"/emscripten/cache'
mich dict && alias dict='dict -c "$XDG_CONFIG_HOME"/dict/dictrc'
+mich btpd && alias btpd='btpd -d "$XDG_DATA_HOME"/btpd'
+mich abook && alias abook='abook -C "$XDG_CONFIG_HOME"/abook/abookrc --datafile "$XDG_DATA_HOME"/abook/addressbook'
# conditioning
## ls conditioning
-mich sl && alias lls=sl && alias llls=sl && alias sls=sl && alias lsl=sl && alias lss=sl
+mich sl && alias ld='sl' && alias lls='sl' && alias llls=sl && alias sls=sl && alias lsl=sl && alias lss=sl && alias kls=sl
## cd conditioning
mich sl && alias cdd=sl
@@ -16,3 +17,9 @@ mich sl && alias cdd=sl
# ip
mich ifconfig && alias lip="ifconfig | grep -w inet | cut -d ' ' -f2"
mich curl && alias gip="curl ifconfig.co"
+
+duck() {
+ url="$*"
+ lynx "https://duckduckgo.com/lite?q=$url"
+}
+alias '?'='duck'
diff --git a/.config/sh/plugin/git b/.config/sh/plugin/git
@@ -1,16 +1,6 @@
mich git || return
-# ----------------------
-# Git Aliases
-# ----------------------
-alias ga='git add'
-alias gb='git branch'
-alias gcm='git commit --message'
-alias gco='git checkout'
-alias gd='git diff'
-alias gds='git diff --staged'
-alias gst='git status'
-alias glg='git log --graph --oneline --decorate --all'
-alias gld='git log --pretty=format:"%h %ad %s" --date=short --all'
+
+alias g='git'
# ----------------------
# Git Functions
diff --git a/.config/sh/plugin/shorthand b/.config/sh/plugin/shorthand
@@ -1,7 +1,7 @@
-# One letter bindings for important commands
+# Bindings for important commands
[ -n "${EDITOR}" ] && alias e='${EDITOR}'
-alias c=clear
+alias cls=clear
mich git && alias g=git
mich pass && alias p=pass
diff --git a/.config/vim/vimrc b/.config/vim/vimrc
@@ -18,16 +18,16 @@ if !has('nvim') | set viminfofile=$XDG_CACHE_HOME/vim/viminfo | endif
" Line number
"Adapted from https://jeffkreeftmeijer.com/vim-number/
-:set number
-:augroup numbertoggle
-: autocmd!
-: autocmd BufEnter,FocusGained,InsertLeave,WinEnter * if &nu && mode() != "i" | set rnu | endif
-: autocmd BufLeave,FocusLost,InsertEnter,WinLeave * if &nu | set nornu | endif
-:augroup END
+set number
+augroup numbertoggle
+ autocmd!
+ autocmd BufEnter,FocusGained,InsertLeave,WinEnter * if &nu && mode() != "i" | set rnu | endif
+ autocmd BufLeave,FocusLost,InsertEnter,WinLeave * if &nu | set nornu | endif
+augroup END
" General
set mouse=a
-set cursorline
+set nocursorline
syntax on
set exrc
set scrolloff=8
@@ -75,8 +75,6 @@ for key in ['h', 'l']
endfor
" Visual Tweaks
-" Remove the ugly splits separator
-set fillchars=vert:\│
hi VertSplit term=NONE cterm=NONE gui=NONE
"TODO use inverse colors from fg and bg instead of hardcoding black and white values
@@ -87,10 +85,10 @@ hi CursorLineNr ctermbg=White ctermfg=Black
" Disable status
set laststatus=0
+set nowrapscan
" Plugins
source $XDG_CONFIG_HOME/vim/plugin/plugin.vim
" Keybindings
source $XDG_CONFIG_HOME/vim/keybindings/keybindings.vim
-
diff --git a/.profile b/.profile
@@ -11,7 +11,6 @@ export VIMINIT="source $XDG_CONFIG_HOME/vim/vimrc"
export LESSHISTFILE=-
export LYNX_CFG="$XDG_CONFIG_HOME/lynx/lynx.cfg"
export LYNX_LSS="$XDG_CONFIG_HOME/lynx/lynx.lss"
-export GNUPGHOME="$XDG_DATA_HOME/gnupg"
export PSQLRC="$XDG_CONFIG_HOME/pg/psqlrc"
export PGPASSFILE="$XDG_CONFIG_HOME/pg/pgpass"
export PGSERVICEFILE="$XDG_CONFIG_HOME/pg/pg_service.conf"
@@ -24,23 +23,35 @@ export SCREENRC="$XDG_CONFIG_HOME"/screen/screenrc
export DOCKER_CONFIG="$XDG_CONFIG_HOME"/docker
export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc
export NOTMUCH_CONFIG="$XDG_CONFIG_HOME/notmuch/config"
-export NPM_CONFIG_USERCONFIG=$XDG_CONFIG_HOME/npm/npmrc
-export FFMPEG_DATADIR="$XDG_CONFIG_HOME"/ffmpeg
+export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc"
export EM_CONFIG="$XDG_CONFIG_HOME"/emscripten/config
+export ELINKS_CONFDIR="$XDG_CONFIG_HOME/elinks"
+export FFMPEG_DATADIR="$XDG_DATA_HOME"/ffmpeg
+export GNUPGHOME="$XDG_DATA_HOME/gnupg"
export ATOM_HOME="$XDG_DATA_HOME"/atom
export NODE_REPL_HISTORY="$XDG_DATA_HOME"/node_repl_history
export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass
-export HISTFILE="$XDG_DATA_HOME"/bash/history
+export HISTFILE="$XDG_DATA_HOME"/history
export RUSTUP_HOME="$XDG_DATA_HOME"/rustup
export MACHINE_STORAGE_PATH="$XDG_DATA_HOME"/docker-machine
export GOPATH="$XDG_DATA_HOME"/go
export NB_PATH="$XDG_DATA_HOME/notebook"
export EM_PORTS="$XDG_DATA_HOME"/emscripten/cache
+export CARGO_HOME="$XDG_DATA_HOME"/cargo
+export GEM_HOME="$XDG_DATA_HOME"/gem
+export TERMINFO="$XDG_DATA_HOME/terminfo"
+export TERMINFO_DIRS="$XDG_DATA_HOME/terminfo":/usr/share/terminfo
+export VSCODE_PORTABLE="$XDG_DATA_HOME/vscode"
+export GRADLE_USER_HOME="$XDG_DATA_HOME"/gradle
+export SQLITE_HISTORY="$XDG_DATA_HOME/sqlite_history"
+export MYSQL_HISTFILE="$XDG_DATA_HOME/mysql_history"
+# export ZDOTDIR="$XDG_DATA_HOME/zsh"
export PSQL_HISTORY="$XDG_CACHE_HOME/pg/psql_history"
export NUGET_PACKAGES="$XDG_CACHE_HOME"/NuGetPackages
export EM_CACHE="$XDG_CACHE_HOME"/emscripten/cache
+export GEM_SPEC_CACHE="$XDG_CACHE_HOME"/gem
# Make `history` print timestamp
HISTTIMEFORMAT="%F %T "
@@ -60,7 +71,8 @@ mich() {
# Setup editor
-export VISUAL=$(mich nvim && echo nvim || echo vim )
+# export VISUAL=$(mich nvim && echo nvim || echo vim )
+export VISUAL=nvi
export EDITOR="$VISUAL"
export BROWSER=$(mich lynx && echo lynx)