dotfiles

Cross platform dotfiles for linux, mac and windows

commit 9096361e7223dbb2da50eb28da0f0ef38e16c2b1
parent 56256777a2fa5e13989e20eea3c79649ebc98c88
Author: Bharatvaj <bharatvaj@yahoo.com>
Date: Mon, 4 Jul 2022 17:04:14 +0530

Merge branch 'base'
70 files changed, 945 insertions(+), 157 deletions(-)
M
.bash_profile
|
3
+--
M
.config/.gitignore
|
34
+++++++++++++++++++++++++++-------
M
.config/X11/xinitrc
|
19
++++++++++++++++---
M
.config/alacritty/alacritty.yml
|
21
+++++++++++++++------
A
.config/alacritty/font.yml
|
15
+++++++++++++++
A
.config/alacritty/theme.yml
|
31
+++++++++++++++++++++++++++++++
A
.config/alacritty/unix.yml
|
3
+++
D
.config/bash/aliases
|
4
----
M
.config/bash/bashrc
|
23
+++++------------------
A
.config/clink/clink_settings
|
2
++
A
.config/cmd/aliases.bat
|
6
++++++
A
.config/cmd/env.bat
|
15
+++++++++++++++
A
.config/cmd/packages.txt
|
16
++++++++++++++++
A
.config/cmd/patch/.config/alacritty/windows.yml
|
3
+++
A
.config/cmd/profile.cmd
|
9
+++++++++
A
.config/cmd/setup.cmd
|
15
+++++++++++++++
A
.config/cmd/setup.ps1
|
10
++++++++++
A
.config/git/config
|
33
+++++++++++++++++++++++++++++++++
M
.config/i3/config
|
36
+++++++++++++++---------------------
A
.config/lf/lfrc
|
4
++++
A
.config/lynx/lynx.cfg
|
36
++++++++++++++++++++++++++++++++++++
A
.config/lynx/lynx.lss
|
87
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A
.config/nvim/init.lua
|
19
+++++++++++++++++++
D
.config/nvim/init.vim
|
3
---
A
.config/nvim/lua/keybindings.lua
|
10
++++++++++
A
.config/nvim/lua/utils.lua
|
11
+++++++++++
R
.config/bash/.gitignore -> .config/sh/.gitignore
|
0
A
.config/sh/aliases
|
39
+++++++++++++++++++++++++++++++++++++++
A
.config/sh/functions
|
38
++++++++++++++++++++++++++++++++++++++
A
.config/tmux/tmux.conf
|
68
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A
.config/vim/gvimrc
|
2
++
A
.config/vim/hyper.vim
|
4
++++
A
.config/vim/keybindings/keybindings.vim
|
67
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A
.config/vim/keybindings/markdown.vim
|
16
++++++++++++++++
A
.config/vim/keybindings/rust.vim
|
1
+
A
.config/vim/keybindings/vimspector.vim
|
25
+++++++++++++++++++++++++
A
.config/vim/plugin/plugin.vim
|
2
++
A
.config/vim/themes/themes.vim
|
0
M
.config/vim/vimrc
|
145
++++++++++++++++++++++++++++++++++++++++++-------------------------------------
A
.gitattributes
|
3
+++
M
.gitignore
|
7
+++++++
A
.gitmodules
|
63
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A
.local/bin/call
|
7
+++++++
A
.local/bin/cmd/j.cmd
|
16
++++++++++++++++
A
.local/bin/cmd/lfcd.cmd
|
15
+++++++++++++++
A
.local/share/.gitignore
|
2
++
A
.local/share/nvim/pack/general/start/nvim-lspconfig
|
1
+
A
.local/share/vim/.gitignore
|
1
+
A
.local/share/vim/pack/development/opt/emmet-vim
|
1
+
A
.local/share/vim/pack/development/opt/rust.vim
|
1
+
A
.local/share/vim/pack/development/opt/vim-cmake
|
1
+
A
.local/share/vim/pack/development/opt/vim-msbuild
|
1
+
A
.local/share/vim/pack/general/opt/editorconfig-vim
|
1
+
A
.local/share/vim/pack/general/opt/vim-better-whitespace
|
1
+
A
.local/share/vim/pack/general/opt/vim-codepainter
|
1
+
A
.local/share/vim/pack/general/opt/vim-commentary
|
1
+
A
.local/share/vim/pack/general/opt/vim-easymotion
|
1
+
A
.local/share/vim/pack/general/opt/vim-fugitive
|
1
+
A
.local/share/vim/pack/general/opt/vim-ninja-feet
|
1
+
A
.local/share/vim/pack/general/opt/vim-surround
|
1
+
A
.local/share/vim/pack/general/opt/vim-textobj-user
|
1
+
A
.local/share/vim/pack/general/opt/vim-textobj-xmlattr
|
1
+
A
.local/share/vim/pack/general/start/mru
|
1
+
A
.local/share/vim/pack/general/start/vim-dispatch
|
1
+
A
.local/share/vim/pack/general/start/vim-repeat
|
1
+
A
.local/share/vim/pack/general/start/vim-tmux-navigator
|
1
+
A
.local/share/vim/pack/general/start/vim-unimpaired
|
1
+
A
.local/share/vim/pack/themes/start/gruvbox-material
|
1
+
M
.profile
|
80
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------
D
X11.md
|
12
------------
diff --git a/.bash_profile b/.bash_profile
@@ -1,10 +1,9 @@
 # If not running interactively, don't do anything
 [[ $- != *i* ]] && return
 
+
 [ -f ~/.profile ] && . ~/.profile
-[ -f ~/.personal/config ] && . ~/.personal/config
 [ -f "${XDG_CONFIG_HOME}/bash/bashrc" ] && . "${XDG_CONFIG_HOME}"/bash/bashrc
 
 # Zoho
 [ -f ~/.zoho/zoho ] && . ~/.zoho/zoho
-
diff --git a/.config/.gitignore b/.config/.gitignore
@@ -1,15 +1,35 @@
-Ignore everything by default.
+# Ignore everything by default.
 *
 
 !.gitignore
+!X11
 !alacritty/
-!alacritty/*
+!alacritty/**
 !bash/
-!bash/*
+!bash/**
+!clink
+!clink/clink_settings
+cmd/userenv.bat
+!cmd/
+# TODO specify each file individually
+!cmd/
+!git/
+!git/config
 !i3
-!nvim
+!lf
+!lf/**
+!lynx/
+!lynx/lynx.cfg
+!lynx/lynx.lss
+!nvim/
+!nvim/**
+!sh/
+!sh/**
+!tmux/
+!tmux/tmux.conf
+!user-dirs.dirs
 !vim/
-!vim/*
-!X11
+!vim/**
 !wgetrc
-!user-dirs.dirs
+
+alacritty/windows.yml
diff --git a/.config/X11/xinitrc b/.config/X11/xinitrc
@@ -1,3 +1,16 @@
-exec i3 &
-exec hsetroot -solid "#000000" &
-exec compton
+#!/bin/sh
+
+__type() {
+    type "$@" >/dev/null 2>/dev/null
+}
+
+__type i3 || (echo "i3 not found" && exit 1)
+
+__type setxkbmap && setxkbmap -option caps:escape
+__type setxkbmap && setxkbmap -option altwin:swap_alt_win
+__type xbmap && xbmap
+__type xrdb && xrdb merge ~/.config/X11/Xresources
+__type hsetroot && exec hsetroot -solid "#000000" &
+__type compton && exec compton &
+
+exec i3
diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml
@@ -1,7 +1,16 @@
-font:
-  size: 16
-shell:
-  program: /usr/local/bin/bash
-  args:
-    - --login
+mouse:
+  hide_when_typing: true
 
+import:
+  - ~/.config/alacritty/theme.yml
+  - ~/.config/alacritty/font.yml
+  - ~/.config/alacritty/unix.yml
+  - ~/.config/alacritty/windows.yml
+
+live_config_reload: true
+
+bell:
+  command: None
+
+selection:
+  save_to_clipboard: true
diff --git a/.config/alacritty/font.yml b/.config/alacritty/font.yml
@@ -0,0 +1,15 @@
+font:
+  normal:
+    family: Fira Code
+    style: SemiBold
+
+  bold:
+    family: Fira Code
+    style: Bold
+
+  italic:
+    family: Fira Code
+    style: Italic
+
+  bold_italic:
+    family: Fira Code
diff --git a/.config/alacritty/theme.yml b/.config/alacritty/theme.yml
@@ -0,0 +1,31 @@
+# Colors (Hyper)
+colors:
+  # Default colors
+  primary:
+    background: '0x000000'
+    foreground: '0xffffff'
+  cursor:
+    text: '0xF81CE5'
+    cursor: '0xffffff'
+
+  # Normal colors
+  normal:
+    black:   '0x000000'
+    red:     '0xfe0100'
+    green:   '0x33ff00'
+    yellow:  '0xfeff00'
+    blue:    '0x0066ff'
+    magenta: '0xcc00ff'
+    cyan:    '0x00ffff'
+    white:   '0xd0d0d0'
+
+  # Bright colors
+  bright:
+    black:   '0x808080'
+    red:     '0xfe0100'
+    green:   '0x33ff00'
+    yellow:  '0xfeff00'
+    blue:    '0x0066ff'
+    magenta: '0xcc00ff'
+    cyan:    '0x00ffff'
+    white:   '0xFFFFFF'
diff --git a/.config/alacritty/unix.yml b/.config/alacritty/unix.yml
@@ -0,0 +1,3 @@
+shell:
+  program: bash
+  args: ['--login', '-i']
diff --git a/.config/bash/aliases b/.config/bash/aliases
@@ -1,4 +0,0 @@
-which startx >&/dev/null && alias startx="startx \"$XDG_CONFIG_HOME/X11/xinitrc\" vt1"
-which wget >&/dev/null && alias wget="wget --hsts-file=\"$XDG_CACHE_HOME/wget-hsts\""
-which nvim >&/dev/null && alias vim="nvim" && alias vi="nvim" 
-
diff --git a/.config/bash/bashrc b/.config/bash/bashrc
@@ -1,25 +1,12 @@
-#
-# ~/.bashrc
-#
-
-# Make `history` print timestamp
-HISTTIMEFORMAT="%F %T "
+set -o vi
 
 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="${PATH_EXPORT}:${PATH}"
-done
+export PATH="${PATH}:${PATH_EXPORTS[*]}"
 
-export PS1="\w $ "
+[ -f ${XDG_CONFIG_HOME}/bash/autojump.bash ] && ${XDG_CONFIG_HOME}/bash/autojump.bash
 
-# Source plugin index
-source "${XDG_CONFIG_HOME}/bash/plugin/index"
+PS1='\w ∆ '
 
-# Aliases
-[ -f "${XDG_CONFIG_HOME}/bash/aliases" ] && . "${XDG_CONFIG_HOME}"/bash/aliases
 
-# Unstaged
-[ -f ~/.config/bash/unstaged ] && . ~/.config/bash/unstaged
+[ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh
diff --git a/.config/clink/clink_settings b/.config/clink/clink_settings
@@ -0,0 +1,2 @@
+clink.autostart=%XDG_CONFIG_HOME%\cmd\profile.cmd
+clink.logo=none
diff --git a/.config/cmd/aliases.bat b/.config/cmd/aliases.bat
@@ -0,0 +1,6 @@
+doskey v=vim $*
+doskey vi=vim $*
+doskey n=nvim $*
+doskey g=git $*
+doskey e=%EDITOR% $*
+doskey l=lfcd.cmd
diff --git a/.config/cmd/env.bat b/.config/cmd/env.bat
@@ -0,0 +1,15 @@
+set HOME=%USERPROFILE%
+set XDG_CONFIG_HOME=%USERPROFILE%\.config
+set XDG_DATA_HOME=%USERPROFILE%\.local\share
+set XDG_CACHE_HOME=%USERPROFILE%\.cache
+set VISUAL=vim
+set EDITOR=%VISUAL%
+
+set GNUPGHOME=%XDG_DATA_HOME%\gnupg
+set PASSWORD_STORE_DIR=%XDG_DATA_HOME%\pass
+set PASS_BASE_DIR=%XDG_DATA_HOME%\pass
+set NB_PATH=%XDG_DATA_HOME%\notebook
+
+set MYVIMRC=%XDG_CONFIG_HOME%\vim\vimrc
+set VIMINIT=source $MYVIMRC
+set PATH=%PATH%;%USERPROFILE%\.local\bin\cmd
diff --git a/.config/cmd/packages.txt b/.config/cmd/packages.txt
@@ -0,0 +1,16 @@
+7zip
+clink
+dos2unix
+gpg
+grep
+lf
+lynx
+make
+mingit
+mpv
+sed
+sudo
+unzip
+uutils
+vim
+wget
diff --git a/.config/cmd/patch/.config/alacritty/windows.yml b/.config/cmd/patch/.config/alacritty/windows.yml
@@ -0,0 +1,3 @@
+shell:
+  program: cmd
+
diff --git a/.config/cmd/profile.cmd b/.config/cmd/profile.cmd
@@ -0,0 +1,9 @@
+@echo off
+
+cd %USERPROFILE%
+prompt $P ∆ 
+
+@call %XDG_CONFIG_HOME%\cmd\env.bat
+@call %XDG_CONFIG_HOME%\cmd\userenv.bat
+
+@call %XDG_CONFIG_HOME%\cmd\aliases.bat
diff --git a/.config/cmd/setup.cmd b/.config/cmd/setup.cmd
@@ -0,0 +1,15 @@
+@echo off
+powershell %XDG_CONFIG_HOME%\cmd\setup.ps1
+@call %XDG_CONFIG_HOME%\cmd\environment.bat
+
+:: Apply config patches
+:: TODO Use mklink instead of xcopy, it will prevent overriding changed files in the destination dir.
+xcopy /Y %USERPROFILE%\.config\cmd\patch %USERPROFILE%\ /S /E
+
+IF NOT EXIST %USERPROFILE%\.config\vim\vimrc mklink %USERPROFILE%\_vimrc %USERPROFILE%\.config\vim\vimrc
+
+mkdir %SYSTEMDRIVE%\bin
+cp %SCOOP%\apps\busybox\current\busybox.exe %SYSTEMDRIVE%\bin
+cp %SCOOP%\shims\sh.* %SYSTEMDRIVE%\bin
+:: TODO Report this in scoop and remove this line
+rm %SCOOP%\apps\gpg\current\bin\gpgconf.ctl
diff --git a/.config/cmd/setup.ps1 b/.config/cmd/setup.ps1
@@ -0,0 +1,10 @@
+Set-ExecutionPolicy RemoteSigned -scope CurrentUser
+
+#TODO Make this work for Administrator accounts
+Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
+
+# Install the absolute essentials
+scoop install $(gc ~/.config/cmd/packages.txt)
+
+# Setup clink
+clink autorun set "clink inject --profile %XDG_CONFIG_HOME%\clink"
diff --git a/.config/git/config b/.config/git/config
@@ -0,0 +1,33 @@
+[alias]
+	a = add
+	b = branch
+	ba = branch --all
+	c = commit
+	ca = commit --amend
+	cl = clone
+	cm = commit --message
+	co = checkout
+	con = config
+	d = diff
+	ds = diff --staged
+	l = log
+	ld = log --pretty=format:"%h %ad %s" --date=short --all
+	lg = log --graph --oneline --decorate --all
+	p = pull
+	pu = push
+	rs = remote --set-url
+	rso = remote --set-url origin
+	rv = remote --verbose
+	sm = submodule
+	st = status
+	suir = submodule update --init --recursive
+	wt = worktree
+
+[difftool]
+	prompt = false
+
+[init]
+	defaultBranch = main
+
+[include]
+	path = config.user
diff --git a/.config/i3/config b/.config/i3/config
@@ -30,8 +30,7 @@ font pango:monospace 8
 floating_modifier $mod
 
 # start a terminal
-bindsym $mod+Return exec --no-startup-id urxvt -name floating
-for_window [class="URxvt" instance="floating"] floating enable
+bindsym $mod+Return exec --no-startup-id alacritty
 
 # kill focused window
 bindsym $mod+Shift+q kill

@@ -45,10 +44,10 @@ bindsym $mod+n exec sh ~/.config/i3/dmenu_search.sh
 # bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
 
 # change focus
-bindsym $mod+j focus left
-bindsym $mod+k focus down
-bindsym $mod+l focus up
-bindsym $mod+semicolon focus right
+bindsym $mod+h focus left
+bindsym $mod+j focus down
+bindsym $mod+k focus up
+bindsym $mod+l focus right
 
 # alternatively, you can use the cursor keys:
 bindsym $mod+Left focus left

@@ -57,10 +56,10 @@ bindsym $mod+Up focus up
 bindsym $mod+Right focus right
 
 # move focused window
-bindsym $mod+Shift+j move left
-bindsym $mod+Shift+k move down
-bindsym $mod+Shift+l move up
-bindsym $mod+Shift+semicolon move right
+bindsym $mod+Shift+h move left
+bindsym $mod+Shift+j move down
+bindsym $mod+Shift+k move up
+bindsym $mod+Shift+l move right
 
 # alternatively, you can use the cursor keys:
 bindsym $mod+Shift+Left move left

@@ -69,7 +68,7 @@ bindsym $mod+Shift+Up move up
 bindsym $mod+Shift+Right move right
 
 # split in horizontal orientation
-bindsym $mod+h split h
+bindsym $mod+s split h
 
 # split in vertical orientation
 bindsym $mod+v split v

@@ -78,7 +77,7 @@ bindsym $mod+v split v
 bindsym $mod+f fullscreen toggle
 
 # change container layout (stacked, tabbed, toggle split)
-bindsym $mod+s layout stacking
+bindsym $mod+semicolon layout stacking
 bindsym $mod+w layout tabbed
 bindsym $mod+e layout toggle split
 

@@ -133,10 +132,10 @@ mode "resize" {
         # Pressing right will grow the window’s width.
         # Pressing up will shrink the window’s height.
         # Pressing down will grow the window’s height.
-        bindsym j resize shrink width 10 px or 10 ppt
-        bindsym k resize grow height 10 px or 10 ppt
-        bindsym l resize shrink height 10 px or 10 ppt
-        bindsym semicolon resize grow width 10 px or 10 ppt
+        bindsym h resize shrink width 10 px or 10 ppt
+        bindsym j resize grow height 10 px or 10 ppt
+        bindsym k resize shrink height 10 px or 10 ppt
+        bindsym l resize grow width 10 px or 10 ppt
 
         # same bindings, but for the arrow keys
         bindsym Left resize shrink width 10 px or 10 ppt

@@ -156,9 +155,4 @@ client.focused       #f5f5f5 #f5f5f5 #000000 #f5f5f5
 new_window 1pixel
 
 bar {
-    status_command i3status
 }
-
-#force floating for all windows
-for_window [class="[.]*"] floating enable
-for_window [window_role="pop-up"] floating enable
diff --git a/.config/lf/lfrc b/.config/lf/lfrc
@@ -0,0 +1,4 @@
+map . set hidden!
+map v :toggle; down
+map V :invert
+set ratios 1:2:1
diff --git a/.config/lynx/lynx.cfg b/.config/lynx/lynx.cfg
@@ -0,0 +1,36 @@
+STARTFILE:https://lite.duckduckgo.com/lite/
+VI_KEYS_ALWAYS_ON:TRUE
+ACCEPT_ALL_COOKIES:TRUE
+TEXTFIELDS_NEED_ACTIVATION:TRUE
+
+AUTO_SESSION:TRUE
+SESSION_FILE:./.cache/lynx/lynx_session
+
+BOOKMARK_FILE:ON
+DEFAULT_BOOKMARK_FILE:./.cache/lynx/lynx_bookmarks.html
+PRETTYSRC:TRUE
+
+UPDATE_TERM_TITLE:TRUE
+DEFAULT_EDITOR:vim
+EDITOR:vim
+
+KEYMAP:J:DOWN_TWO
+KEYMAP:K:UP_TWO
+DEFAULT_KEYPAD_MODE:LINKS_AND_FIELDS_ARE_NUMBERED
+MAKE_LINKS_FOR_ALL_IMAGES:TRUE
+
+# Status line pausing
+INFOSECS:0.5
+MESSAGESECS:0.5
+ALERTSECS:3
+NO_PAUSE:TRUE
+
+USE_EXTERNALS:TRUE
+DEFAULT_USER_MODE:ADVANCED
+EXTERNAL:http:open -u %s &:TRUE
+KEYMAP:o:ECGOTO
+KEYMAP:O:GOTO
+KEYMAP:g:HOME
+KEYMAP:G:END
+
+DOWNLOADER:wget:wget %s:TRUE
diff --git a/.config/lynx/lynx.lss b/.config/lynx/lynx.lss
@@ -0,0 +1,87 @@
+em:		bold:	brightblue
+strong:	bold:	brightred
+b:		bold:	red
+i:		bold:	brightblue
+a:		bold:	green
+img:	dim:	brown
+fig:	normal:	gray
+caption:	reverse:	brown
+hr:		normal:	yellow
+blockquote:	normal:	brightblue
+ul:		normal:	brown
+address:	normal:	magenta
+title:	normal:	magenta
+tt:		dim:	brightmagenta:	black
+h1:		bold:	black:	white
+label:	normal:	magenta
+q:		normal:	yellow:	magenta
+small:	dim:	default
+big:	bold:	yellow
+sup:	bold:	yellow
+sub:	dim:	gray
+li:		normal:	magenta
+code:	normal:	cyan
+cite:	normal:	cyan
+
+table:	normal:	brightcyan
+tr:		bold:	brown
+td:		normal:	default
+br:		normal:	default
+
+alink:		normal:		black:		lightgray
+status:		reverse:		black:		lightgray
+alert:		bold:			yellow:		red
+whereis:	reverse+underline:	magenta:	cyan
+
+menu.bg:	normal:			black:		lightgray
+menu.frame:	normal:			black:		lightgray
+menu.entry:	normal:			lightgray:	black
+menu.n:		normal:			red:		gray
+menu.active:	normal:		yellow:		black
+menu.sb:	normal:			brightred:	lightgray
+
+forwbackw.arrow:reverse
+hot.paste:	normal:			brightred:	gray
+
+# Styles with classes - <ul class=red> etc.
+ul.red:		underline:		brightred
+ul.blue:	bold:			brightblue
+li.red:		reverse:		red:	yellow
+li.blue:	bold:			blue
+strong.a:	bold:			black:	red
+em.a:		reverse:		black:	blue
+strong.b:	bold:			white:	red
+em.b:		reverse:		white:	blue
+strong.debug:	reverse:	green
+font.letter:	normal:		white:	blue
+input.submit:	normal:		cyan
+tr.baone:	bold:			yellow
+tr.batwo:	bold:			green
+tr.bathree:	bold:			red
+
+# Special handling for link.
+link:		normal:			white
+link.green:	bold:			brightgreen
+link.red:	bold:			black:		red
+link.blue:	bold:			white:		blue
+link.toc:	bold:			black:		white
+
+# Special cases for link - the rel or title is appended after the class.
+# <link rel=next class=red href="1">
+link.red.next:	bold:			red
+link.red.prev:	bold:			yellow:		red
+link.blue.prev:	bold:			yellow:		blue
+link.blue.next:	bold:			blue
+link.green.toc:	bold:			white:		green
+
+# Define styles that will be used when syntax highlighting is requested
+span.htmlsrc_comment:normal:		white
+span.htmlsrc_tag:normal:		white
+span.htmlsrc_attrib:normal:		cyan
+span.htmlsrc_attrval:normal:		magenta
+span.htmlsrc_abracket:normal:		white
+span.htmlsrc_entity:normal:		white
+span.htmlsrc_badseq:normal:		red
+span.htmlsrc_badtag:normal:		red
+span.htmlsrc_badattr:normal:		red
+span.htmlsrc_sgmlspecial:normal:	yellow
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua
@@ -0,0 +1,19 @@
+vim.g.mapleader = ' '
+local set = vim.opt
+
+set.packpath="$XDG_DATA_HOME/nvim"
+
+local map = require("utils").map
+
+map("n", "<Leader>ww", ":w<CR>", { silent = true })
+map("n", "<Leader>wq", ":wq<CR>", { silent = true })
+map("n", "<Leader>qq", ":q<CR>", { silent = true })
+map("n", "<CR>", ":noh<CR>", { silent = true })
+
+set.tabstop=4
+set.exrc=false
+
+
+require'lspconfig'.pyright.setup{}
+
+set.shortmess="Iat"
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
@@ -1,3 +0,0 @@
-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/nvim/lua/keybindings.lua b/.config/nvim/lua/keybindings.lua
@@ -0,0 +1,10 @@
+local map = require("utils").map
+map("n", "<Leader>ww", ":w<CR>", { silent = true })
+map("n", "<Leader>wq", ":wq<CR>", { silent = true })
+map("n", "<Leader>qq", ":q<CR>", { silent = true })
+map("n", "<CR>", ":noh<CR>", { silent = true })
+
+map("n", "<leader>f", ":find ", { silent = false })
+map("n", "<leader>co", ":copen<cr>", { silent = false })
+map("n", "<leader>g", ":grep ", { silent = false})
+map("n", "<leader>ec", ":edit ~/.config/nvim/init.lua<cr>", { silent = false})
diff --git a/.config/nvim/lua/utils.lua b/.config/nvim/lua/utils.lua
@@ -0,0 +1,11 @@
+local M = {}
+
+function M.map(mode, lhs, rhs, opts)
+    local options = { noremap = true }
+    if opts then
+        options = vim.tbl_extend("force", options, opts)
+    end
+    vim.api.nvim_set_keymap(mode, lhs, rhs, options)
+end
+
+return M
diff --git a/.config/bash/.gitignore b/.config/sh/.gitignore
diff --git a/.config/sh/aliases b/.config/sh/aliases
@@ -0,0 +1,39 @@
+# [xdg]
+alias abook='abook --config "$XDG_CONFIG_HOME"/abook/abookrc --datafile "$XDG_DATA_HOME"/abook/addressbook'
+alias abook='abook -C "$XDG_CONFIG_HOME"/abook/abookrc --datafile "$XDG_DATA_HOME"/abook/addressbook'
+alias btpd='btpd -d "$XDG_DATA_HOME"/btpd'
+alias dict='dict -c "$XDG_CONFIG_HOME"/dict/dictrc'
+alias mbsync='mbsync -c "$XDG_CONFIG_HOME"/isync/mbsyncrc'
+alias startx='startx "$XDG_CONFIG_HOME/X11/xinitrc" vt1'
+alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"'
+
+# [ls_conditioning]
+thwart sl && thwart ld && thwart lls &&  thwart sls && thwart lsl && thwart lss && thwart kls
+# [cd_conditioning]
+thwart cdd
+
+# [ip]
+there ifconfig && alias lip="ifconfig | grep -w inet  | cut -d ' ' -f2"
+there curl && alias gip="curl ifconfig.co"
+
+# [navigation]
+alias -- -='cd -'
+alias ....='cd ../../..'
+alias ...='cd ../..'
+alias ..='cd ..'
+alias cf="quickopen cd d"
+alias ef="quickopen ${EDITOR} f"
+alias vf="quickopen ${VISUAL} f"
+
+# [shorthands]
+alias '?d'='sr duckduckgo'
+alias cls=clear
+alias d='wget'
+alias e='${EDITOR}'
+alias f='find . -name '
+alias g='git'
+alias g=git
+alias l=lfcd
+alias n='nvim'
+alias v='vim'
+alias x=extract_archive
diff --git a/.config/sh/functions b/.config/sh/functions
@@ -0,0 +1,38 @@
+# TODO implement [dest_dir] functionality
+extract_archive () {
+	test $# -lt 1 && { printf "Usage: $0 <archive>\n"; exit 1; }
+	test -f $1 || { printf "$0: $1: No such file \n"; exit 1; }
+	case $1 in
+		*.Z) 7z x $1 ;;
+		*.bz2) bzip2 -d $1 ;;
+		*.gz) gunzip -d $1 ;;
+		*.rar) unrar x $1 ;;
+		*.tar) tar -xvf $1 ;;
+		*.tar.bz2) tar -jxvf $1 ;;
+		*.tar.gz) tar -zxvf $1 ;;
+		*.tgz) tar -zxvf $1 ;;
+		*.zip) unzip $1 ;;
+	*) echo "'$1' Error. Unsupported filetype." ;;
+	esac
+}
+
+md() {
+	mkdir "$@" && cd "$@"
+}
+
+# TODO make it non-interruptable
+insult() {
+	printf "You are a noob for typing '$1'\n"
+	sleep 5
+}
+
+thwart() {
+	alias $1="insult '$1'"
+}
+
+quickopen() {
+	test -z "${FUZZER}" && printf '${FUZZER} not set\n'
+	test "$#" -lt 1 && print "usage: $0 <command> [find -type]"
+	test -z "$2" && 2=f
+	${1} "$(find . -type $2 -maxdepth 3 2>/dev/null | ${FUZZER})"
+}
diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf
@@ -0,0 +1,68 @@
+# Miscellaneous
+set -g base-index 1
+set escape-time 0
+set -g set-titles on
+
+# Status bar
+set -g status-position top
+set -g status-justify absolute-centre
+set -g status-right ""
+set -g status-keys vi
+bind v split-window -h
+bind s split-window -v
+
+# Navigation
+set-window-option -g mode-keys vi
+
+bind -n C-h select-pane -L
+bind -n C-j select-pane -D
+bind -n C-k select-pane -U
+bind -n C-l select-pane -R
+
+bind J resize-pane -D 5
+bind K resize-pane -U 5
+bind H resize-pane -L 5
+bind L resize-pane -R 5
+
+# Clipboard
+unbind -T copy-mode-vi Space
+unbind -T copy-mode-vi Enter
+
+bind -T copy-mode-vi v send-keys -X begin-selection
+bind -T copy-mode-vi y send-keys -X copy-selection-and-cancel
+
+set-option -g mouse on
+setw -g mode-keys vi
+set-option -s set-clipboard off
+bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
+bind P paste-buffer
+
+# Themes
+set -g status-bg black
+set -g status-fg white
+set -g status-right "#(mpc current)"
+set -g window-status-current-style "bg=black,fg=red"
+set -g pane-active-border-style "fg=red"
+
+# Smart pane switching with awareness of Vim splits.
+# See: https://github.com/christoomey/vim-tmux-navigator
+is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
+    | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
+bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h'  'select-pane -L'
+bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j'  'select-pane -D'
+bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k'  'select-pane -U'
+bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l'  'select-pane -R'
+tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")'
+if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \
+    "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\'  'select-pane -l'"
+if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \
+    "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\'  'select-pane -l'"
+
+bind-key -T copy-mode-vi 'C-h' select-pane -L
+bind-key -T copy-mode-vi 'C-j' select-pane -D
+bind-key -T copy-mode-vi 'C-k' select-pane -U
+bind-key -T copy-mode-vi 'C-l' select-pane -R
+bind-key -T copy-mode-vi 'C-\' select-pane -l
+bind R source-file ~/.config/tmux/tmux.conf
+bind N display-popup -E "ncmpcpp --quiet --screen visualizer"
+
diff --git a/.config/vim/gvimrc b/.config/vim/gvimrc
@@ -0,0 +1,2 @@
+set guifont=Fira\ Code\ SemiBold
+set guioptions=
diff --git a/.config/vim/hyper.vim b/.config/vim/hyper.vim
@@ -0,0 +1,4 @@
+hi LineNr guifg=DarkGray ctermfg=DarkGray
+hi LineNrAbove guifg=LightGray ctermfg=LightGray
+hi LineNrBelow guifg=LightGray ctermfg=LightGray
+
diff --git a/.config/vim/keybindings/keybindings.vim b/.config/vim/keybindings/keybindings.vim
@@ -0,0 +1,67 @@
+" General keybindings
+nmap <leader>F :GFiles<cr>
+nnoremap <Leader>l :ls<CR>:b<space>
+nnoremap <leader><leader> :grep 
+nnoremap <leader>co :copen<cr>
+nnoremap <leader>ec :edit ~/.config/vim/vimrc<cr>
+nnoremap <leader>f :find 
+nnoremap <leader>g :grep 
+nnoremap <leader>p :Rg<cr>
+nnoremap <leader>t :tabnew<cr>
+nnoremap Y y$
+
+
+fun! GitFind()
+endfun
+
+fun! SetupCommandAlias(from, to)
+  exec 'cnoreabbrev <expr> '.a:from
+        \ .' ((getcmdtype() is# ":" && getcmdline() is# "'.a:from.'")'
+        \ .'? ("'.a:to.'") : ("'.a:from.'"))'
+endfun
+call SetupCommandAlias("W","w")
+call SetupCommandAlias("Wq","wq")
+
+function! ToggleList()
+	if &list == "nolist"
+		set list
+	else
+		set nolist
+	endif
+endfunction
+
+nnoremap <leader>tl :call ToggleList()<CR>
+
+" Buffer Creation
+nnoremap <Leader>v :vsplit<enter>
+nnoremap <Leader>s :split<enter>
+
+" Quick save and write
+nnoremap <leader>wq :wq<cr>
+nnoremap <leader>ww :w<cr>
+nnoremap <leader>qq :q<cr>
+
+" Run Make
+
+function SaveAndBuild()
+		wall
+		Make
+endfunction
+
+nnoremap <leader>bb :call SaveAndBuild()<CR>
+
+" Generate ctags
+map <leader>c :!ctags -R -f ./.git/tags .<CR>
+
+nnoremap <CR> :noh<CR><CR>:<backspace>
+
+" Plugin keybindings
+source ~/.config/vim/keybindings/vimspector.vim
+source ~/.config/vim/keybindings/markdown.vim
+
+" Development keybindings
+" TODO Have a default build hotkey keybinding, maybe bb,br?
+" And make it based on the project
+" Make it as a filetype plugin. This should cover most cases.
+nnoremap <leader>cb :Cargo build<cr>
+nnoremap <leader>cr :Cargo run<cr>
diff --git a/.config/vim/keybindings/markdown.vim b/.config/vim/keybindings/markdown.vim
@@ -0,0 +1,16 @@
+autocmd FileType markdown set cursorline
+
+" Hide and format markdown elements like **bold**
+autocmd FileType markdown set conceallevel=2
+
+function QuickUnderline(n)
+	if a:n == 1
+		normal! yypv$r=
+	else
+		normal! yypv$r-
+	endif
+endfunction
+
+function ReverseDate()
+	normal! dt/wwpldeBP
+endfunction
diff --git a/.config/vim/keybindings/rust.vim b/.config/vim/keybindings/rust.vim
@@ -0,0 +1 @@
+
diff --git a/.config/vim/keybindings/vimspector.vim b/.config/vim/keybindings/vimspector.vim
@@ -0,0 +1,25 @@
+fun! GotoWindow(id)
+    call win_gotoid(a:id)
+endfun
+
+" Debugger remaps
+nnoremap <leader>dd :call vimspector#Launch()<CR>
+nnoremap <leader>dc :call GotoWindow(g:vimspector_session_windows.code)<CR>
+nnoremap <leader>dt :call GotoWindow(g:vimspector_session_windows.tagpage)<CR>
+nnoremap <leader>dv :call GotoWindow(g:vimspector_session_windows.variables)<CR>
+nnoremap <leader>dw :call GotoWindow(g:vimspector_session_windows.watches)<CR>
+nnoremap <leader>ds :call GotoWindow(g:vimspector_session_windows.stack_trace)<CR>
+nnoremap <leader>do :call GotoWindow(g:vimspector_session_windows.output)<CR>
+nnoremap <leader>de :call vimspector#Reset()<CR>
+
+nnoremap <leader>dtcb :call vimspector#CleanLineBreakpoint()<CR>
+
+nmap <leader>dl <Plug>VimspectorStepInto
+nmap <leader>dj <Plug>VimspectorStepOver
+nmap <leader>dk <Plug>VimspectorStepOut
+nmap <leader>d_ <Plug>VimspectorRestart
+nnoremap <leader>d<space> :call vimspector#Continue()<CR>
+
+nmap <leader>drc <Plug>VimspectorRunToCursor
+nmap <leader>dbp <Plug>VimspectorToggleBreakpoint
+nmap <leader>dcbp <Plug>VimspectorToggleConditionalBreakpoint
diff --git a/.config/vim/plugin/plugin.vim b/.config/vim/plugin/plugin.vim
@@ -0,0 +1,2 @@
+" Plugin Keybindings
+nnoremap <leader>cc :ChecklistToggleCheckbox<cr>
diff --git a/.config/vim/themes/themes.vim b/.config/vim/themes/themes.vim
diff --git a/.config/vim/vimrc b/.config/vim/vimrc
@@ -1,89 +1,98 @@
-" Use XDG Paths for vim
-set runtimepath^=$XDG_CONFIG_HOME/vim
-set runtimepath+=$XDG_DATA_HOME/vim
-set runtimepath+=$XDG_CONFIG_HOME/vim/after
-
-set packpath^=$XDG_DATA_HOME/vim,$XDG_CONFIG_HOME/vim
-set packpath+=$XDG_CONFIG_HOME/vim/after,$XDG_DATA_HOME/vim/after
-
-let g:netrw_home = $XDG_DATA_HOME."/vim"
-call mkdir($XDG_DATA_HOME."/vim/spell", 'p')
-set viewdir=$XDG_DATA_HOME/vim/view | call mkdir(&viewdir, 'p')
-
-set backupdir=$XDG_CACHE_HOME/vim/backup | call mkdir(&backupdir, 'p')
-set directory=$XDG_CACHE_HOME/vim/swap   | call mkdir(&directory, 'p')
-set undodir=$XDG_CACHE_HOME/vim/undo     | call mkdir(&undodir,   'p')
-
-if !has('nvim') | set viminfofile=$XDG_CACHE_HOME/vim/viminfo | endif
+if !has('nvim') | set viminfofile=$XDG_CACHE_DIR/vim/viminfo | endif
 
 " General
+set number
+set mouse=
+set nocursorline
+set exrc
+set t_te=
 
-"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
+" Turn backup off
+set nobackup
+set nowb
+set noswapfile
 
-set mouse=a
-syntax on
-set exrc
+" Map leader to space
+nnoremap <SPACE> <Nop>
+let mapleader = " "
+
+" Enable hidden buffers
+set hidden
 
 " Disable auto fixing end of line
 " Useful when opening binary files
 set nofixendofline
 
 " Disable vim intro message
-set shortmess=I
+set shortmess=Iat
 
 " Search
 set hlsearch
 set incsearch
 
-" Anti-tab
+" Pro tab
 filetype plugin indent on
 set tabstop=4
 set shiftwidth=4
-set expandtab
 
 " Netrw customization
 let g:netrw_banner = 0
-
-" Hard vim
-for key in ['<Up>', '<Down>', '<Left>', '<Right>']
-  exec 'noremap' key '<Nop>'
-  exec 'inoremap' key '<Nop>'
-  exec 'cnoremap' key '<Nop>'
-endfor
-
-" Plugin Management
-"let data_dir = has('nvim') ? stdpath('data') . '/site' : "${XDG_DATA_HOME}/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($XDG_DATA_HOME."/vim/plugged")
-    Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
-    Plug 'junegunn/fzf.vim'
-    Plug 'cdelledonne/vim-cmake'
-    Plug 'editorconfig/editorconfig-vim'
-    Plug 'tpope/vim-fugitive'
-    Plug 'tpope/vim-surround'
-call plug#end()
-
-" Plugin customizations
-" fzf
-" BUG remove bashism
-" TODO - Files are repeated twice in some cases
-command! GFAll call fzf#run(fzf#wrap({'source': "comm <(git ls-files --exclude-standard --cached --cached --recurse-submodules) <(git ls-files --exclude-standard --cached --others) | awk '{$1=$1;print}'"}))
-
-" Plugin Keybindings
-nmap <leader>f :GFAll<cr>
-nmap <leader>F :Files<cr>
-nnoremap <leader>t :tabnew<cr>
-nnoremap <leader>p :Rg<cr>
-nnoremap <leader>s :source ~/.config/vim/vimrc<cr>
-
-" Theming Begin
-" Theming End
+let g:netrw_liststyle = 3
+
+" Disable status
+set laststatus=1
+set nowrapscan
+
+set lazyredraw
+set ttyfast
+
+" Plugins
+source $XDG_CONFIG_HOME/vim/plugin/plugin.vim
+
+" Keybindings
+source $XDG_CONFIG_HOME/vim/keybindings/keybindings.vim
+
+set packpath^=$XDG_DATA_HOME/vim
+
+function! s:load_plugins(t) abort
+	" Use XDG Paths for vim
+	syntax on
+	set synmaxcol=128
+	" TODO compile hard constants somewhere based on OS
+	set runtimepath^='$XDG_CONFIG_HOME/vim'
+	set runtimepath+='$XDG_DATA_HOME/vim'
+	set runtimepath+='$XDG_CONFIG_HOME/vim/after'
+
+	let g:netrw_home = $XDG_DATA_HOME . "/vim"
+	call mkdir($XDG_DATA_HOME . "/vim/spell", 'p')
+	set viewdir=$XDG_DATA_HOME/vim/view | call mkdir(&viewdir, 'p')
+
+	set backupdir=$XDG_CACHE_HOME/vim/backup | call mkdir(&backupdir, 'p')
+	set directory=$XDG_CACHE_HOME/vim/swap   | call mkdir(&directory, 'p')
+	set undodir=$XDG_CACHE_HOME/vim/undo     | call mkdir(&undodir,   'p')
+	packadd vim-tmux-navigator
+	packadd editorconfig-vim
+	packadd vim-commentary
+	packadd vim-surround
+	packadd vim-ninja-feet
+	packadd vim-fugitive
+	packadd vim-better-whitespace
+endfunction
+
+augroup user_cmds
+	autocmd!
+	autocmd VimEnter * call timer_start(20, function('s:load_plugins'))
+augroup END
+
+if has("gui")
+	source $XDG_CONFIG_HOME/vim/gvimrc
+endif
+
+if has("win32")
+	set shell=cmd
+	set shellquote=\" 
+	" shellxquote must be a literal space character.
+	set shellxquote=  
+endif
+
+set fillchars+=eob:\ 
diff --git a/.gitattributes b/.gitattributes
@@ -0,0 +1,3 @@
+* text eol=lf
+*.cmd text eol=crlf
+*.bat text eol=crlf
diff --git a/.gitignore b/.gitignore
@@ -14,3 +14,10 @@
 # Config
 !.config/
 
+# Local shell scripts
+!.local/
+!.local/bin/
+!.local/bin/**
+
+# !.local/share/vim/pack/**/start/**
+# !.local/share/vim/pack/**/opt/**
diff --git a/.gitmodules b/.gitmodules
@@ -0,0 +1,63 @@
+[submodule ".local/share/vim/pack/development/opt/rust.vim"]
+	path = .local/share/vim/pack/development/opt/rust.vim
+	url = https://git::@github.com/rust-lang/rust.vim.git
+[submodule ".local/share/vim/pack/development/opt/vim-cmake"]
+	path = .local/share/vim/pack/development/opt/vim-cmake
+	url = https://git::@github.com/cdelledonne/vim-cmake.git
+[submodule ".local/share/vim/pack/development/opt/vim-msbuild"]
+	path = .local/share/vim/pack/development/opt/vim-msbuild
+	url = https://git::@github.com/heaths/vim-msbuild.git
+[submodule ".local/share/vim/pack/development/opt/emmet-vim"]
+	path = .local/share/vim/pack/development/opt/emmet-vim
+	url = https://github.com/mattn/emmet-vim
+[submodule ".local/share/vim/pack/general/opt/editorconfig-vim"]
+	path = .local/share/vim/pack/general/opt/editorconfig-vim
+	url = https://git::@github.com/editorconfig/editorconfig-vim.git
+[submodule ".local/share/vim/pack/general/opt/vim-better-whitespace"]
+	path = .local/share/vim/pack/general/opt/vim-better-whitespace
+	url = https://git::@github.com/ntpeters/vim-better-whitespace.git
+[submodule ".local/share/vim/pack/general/opt/vim-codepainter"]
+	path = .local/share/vim/pack/general/opt/vim-codepainter
+	url = https://git::@github.com/lpinilla/vim-codepainter.git
+[submodule ".local/share/vim/pack/general/opt/vim-commentary"]
+	path = .local/share/vim/pack/general/opt/vim-commentary
+	url = https://git::@github.com/tpope/vim-commentary.git
+[submodule ".local/share/vim/pack/general/opt/vim-surround"]
+	path = .local/share/vim/pack/general/opt/vim-surround
+	url = https://git::@github.com/tpope/vim-surround.git
+[submodule ".local/share/vim/pack/general/opt/vim-easymotion"]
+	path = .local/share/vim/pack/general/opt/vim-easymotion
+	url = https://git::@github.com/easymotion/vim-easymotion.git
+[submodule ".local/share/vim/pack/general/opt/vim-fugitive"]
+	path = .local/share/vim/pack/general/opt/vim-fugitive
+	url = https://git::@github.com/tpope/vim-fugitive.git
+[submodule ".local/share/vim/pack/general/opt/vim-ninja-feet"]
+	path = .local/share/vim/pack/general/opt/vim-ninja-feet
+	url = https://git::@github.com/tommcdo/vim-ninja-feet.git
+[submodule ".local/share/vim/pack/general/opt/vim-textobj-user"]
+	path = .local/share/vim/pack/general/opt/vim-textobj-user
+	url = https://git::@github.com/kana/vim-textobj-user.git
+[submodule ".local/share/vim/pack/general/opt/vim-textobj-xmlattr"]
+	path = .local/share/vim/pack/general/opt/vim-textobj-xmlattr
+	url = https://git::@github.com/whatyouhide/vim-textobj-xmlattr.git
+[submodule ".local/share/vim/pack/themes/start/gruvbox-material"]
+	path = .local/share/vim/pack/themes/start/gruvbox-material
+	url = https://git::@github.com/sainnhe/gruvbox-material.git
+[submodule ".local/share/nvim/pack/general/start/nvim-lspconfig"]
+	path = .local/share/nvim/pack/general/start/nvim-lspconfig
+	url = https://github.com/neovim/nvim-lspconfig
+[submodule ".local/share/vim/pack/general/start/vim-unimpaired"]
+	path = .local/share/vim/pack/general/start/vim-unimpaired
+	url = https://github.com/tpope/vim-unimpaired
+[submodule ".local/share/vim/pack/general/start/vim-repeat"]
+	path = .local/share/vim/pack/general/start/vim-repeat
+	url = https://git::@github.com/tpope/vim-repeat.git
+[submodule ".local/share/vim/pack/general/start/vim-tmux-navigator"]
+	path = .local/share/vim/pack/general/start/vim-tmux-navigator
+	url = https://github.com/christoomey/vim-tmux-navigator
+[submodule ".local/share/vim/pack/general/start/vim-dispatch"]
+	path = .local/share/vim/pack/general/start/vim-dispatch
+	url = https://github.com/tpope/vim-dispatch
+[submodule ".local/share/vim/pack/general/start/mru"]
+	path = .local/share/vim/pack/general/start/mru
+	url = https://github.com/yegappan/mru
diff --git a/.local/bin/call b/.local/bin/call
@@ -0,0 +1,7 @@
+export TERMUX_CONTACTS_LIST="$(termux-contact-list)"
+
+export CNA="$(echo "${TERMUX_CONTACTS_LIST}" | jq '.[] | .name' | fzf)"
+
+CONTACT_NUMBER="$(echo "${TERMUX_CONTACTS_LIST}" | jq -r ".[] | select(.name==$CNA) | .number")"
+echo "${CONTACT_NUMBER}"
+termux-telephony-call "${CONTACT_NUMBER}"
diff --git a/.local/bin/cmd/j.cmd b/.local/bin/cmd/j.cmd
@@ -0,0 +1,16 @@
+@echo off
+setlocal EnableDelayedExpansion
+
+for /f "delims=" %%i in ('"autojump.exe" %*') do set new_path=%%i
+if exist !new_path!\nul (
+echo "!new_path!"
+pushd "!new_path!"
+REM endlocal is necessary so that we can change directory for outside of this script
+REM but will automatically popd. We mush pushd twice to work around this.
+pushd "!new_path!"
+endlocal
+popd
+) else (
+echo autojump: directory %* not found
+echo try `autojump --help` for more information
+)
diff --git a/.local/bin/cmd/lfcd.cmd b/.local/bin/cmd/lfcd.cmd
@@ -0,0 +1,15 @@
+@echo off
+rem Change working dir in cmd.exe to last dir in lf on exit.
+rem
+rem You need to put this file to a folder in %PATH% variable.
+
+:tmploop
+set tmpfile="%tmp%\lf.%random%.tmp"
+if exist %tmpfile% goto:tmploop
+lf -last-dir-path=%tmpfile% %*
+if not exist %tmpfile% exit
+set /p dir=<%tmpfile%
+del /f %tmpfile%
+if not exist "%dir%" exit
+if "%dir%" == "%cd%" exit
+cd /d "%dir%"
diff --git a/.local/share/.gitignore b/.local/share/.gitignore
@@ -0,0 +1,2 @@
+!vim/pack/
+!vim/pack/*
diff --git a/.local/share/nvim/pack/general/start/nvim-lspconfig b/.local/share/nvim/pack/general/start/nvim-lspconfig
@@ -0,0 +1 @@
+Subproject commit 54181ddb2709a4cd594e29bf82343c79196ec0c6
diff --git a/.local/share/vim/.gitignore b/.local/share/vim/.gitignore
@@ -0,0 +1 @@
+!pack/**/start/**
diff --git a/.local/share/vim/pack/development/opt/emmet-vim b/.local/share/vim/pack/development/opt/emmet-vim
@@ -0,0 +1 @@
+Subproject commit 1b7e460de071b7ed45cae3b5bec47310e7d12ed5
diff --git a/.local/share/vim/pack/development/opt/rust.vim b/.local/share/vim/pack/development/opt/rust.vim
@@ -0,0 +1 @@
+Subproject commit c06a17151c69b9d61e60a28274932a28fd37c453
diff --git a/.local/share/vim/pack/development/opt/vim-cmake b/.local/share/vim/pack/development/opt/vim-cmake
@@ -0,0 +1 @@
+Subproject commit 844b85677d52d932432eb115236d9173ebe3664d
diff --git a/.local/share/vim/pack/development/opt/vim-msbuild b/.local/share/vim/pack/development/opt/vim-msbuild
@@ -0,0 +1 @@
+Subproject commit 4766d9a225c433e7ce2625bcc6263bfd028c4a50
diff --git a/.local/share/vim/pack/general/opt/editorconfig-vim b/.local/share/vim/pack/general/opt/editorconfig-vim
@@ -0,0 +1 @@
+Subproject commit 3078cd10b28904e57d878c0d0dab42aa0a9fdc89
diff --git a/.local/share/vim/pack/general/opt/vim-better-whitespace b/.local/share/vim/pack/general/opt/vim-better-whitespace
@@ -0,0 +1 @@
+Subproject commit c5afbe91d29c5e3be81d5125ddcdc276fd1f1322
diff --git a/.local/share/vim/pack/general/opt/vim-codepainter b/.local/share/vim/pack/general/opt/vim-codepainter
@@ -0,0 +1 @@
+Subproject commit 1ae0ee4f48e7e196ef90bc84ecbc56cad231e9df
diff --git a/.local/share/vim/pack/general/opt/vim-commentary b/.local/share/vim/pack/general/opt/vim-commentary
@@ -0,0 +1 @@
+Subproject commit 349340debb34f6302931f0eb7139b2c11dfdf427
diff --git a/.local/share/vim/pack/general/opt/vim-easymotion b/.local/share/vim/pack/general/opt/vim-easymotion
@@ -0,0 +1 @@
+Subproject commit d75d9591e415652b25d9e0a3669355550325263d
diff --git a/.local/share/vim/pack/general/opt/vim-fugitive b/.local/share/vim/pack/general/opt/vim-fugitive
@@ -0,0 +1 @@
+Subproject commit 6f07d7e6cd23b7a76dc461fdfb1984717d233806
diff --git a/.local/share/vim/pack/general/opt/vim-ninja-feet b/.local/share/vim/pack/general/opt/vim-ninja-feet
@@ -0,0 +1 @@
+Subproject commit cb9b448dd468a338255aed474e6113ed115612c1
diff --git a/.local/share/vim/pack/general/opt/vim-surround b/.local/share/vim/pack/general/opt/vim-surround
@@ -0,0 +1 @@
+Subproject commit f51a26d3710629d031806305b6c8727189cd1935
diff --git a/.local/share/vim/pack/general/opt/vim-textobj-user b/.local/share/vim/pack/general/opt/vim-textobj-user
@@ -0,0 +1 @@
+Subproject commit 41a675ddbeefd6a93664a4dc52f302fe3086a933
diff --git a/.local/share/vim/pack/general/opt/vim-textobj-xmlattr b/.local/share/vim/pack/general/opt/vim-textobj-xmlattr
@@ -0,0 +1 @@
+Subproject commit 694a297f1d75fd527e87da9769f3c6519a87ebb1
diff --git a/.local/share/vim/pack/general/start/mru b/.local/share/vim/pack/general/start/mru
@@ -0,0 +1 @@
+Subproject commit 8e8220a005d070dbd01caae86e3139d83fc444c4
diff --git a/.local/share/vim/pack/general/start/vim-dispatch b/.local/share/vim/pack/general/start/vim-dispatch
@@ -0,0 +1 @@
+Subproject commit 00e77d90452e3c710014b26dc61ea919bc895e92
diff --git a/.local/share/vim/pack/general/start/vim-repeat b/.local/share/vim/pack/general/start/vim-repeat
@@ -0,0 +1 @@
+Subproject commit 24afe922e6a05891756ecf331f39a1f6743d3d5a
diff --git a/.local/share/vim/pack/general/start/vim-tmux-navigator b/.local/share/vim/pack/general/start/vim-tmux-navigator
@@ -0,0 +1 @@
+Subproject commit 9ca5bfe5bd274051b5dd796cc150348afc993b80
diff --git a/.local/share/vim/pack/general/start/vim-unimpaired b/.local/share/vim/pack/general/start/vim-unimpaired
@@ -0,0 +1 @@
+Subproject commit e4006d68cd4f390efef935bc09be0ce3bd022e72
diff --git a/.local/share/vim/pack/themes/start/gruvbox-material b/.local/share/vim/pack/themes/start/gruvbox-material
@@ -0,0 +1 @@
+Subproject commit fb27ccbd20cc1eda04e181f22c722977bdf9c934
diff --git a/.profile b/.profile
@@ -1,30 +1,84 @@
-export GREP_OPTIONS='--color=auto'
+#!/bin/sh
 export GREP_COLOR='1;35;40'
 
 # XDG
-export XDG_DATA_HOME="$HOME/.local/share"
 export XDG_CONFIG_HOME="$HOME/.config"
+export XDG_DATA_HOME="$HOME/.local/share"
 export XDG_CACHE_HOME="$HOME/.cache"
-export GNUPGHOME="$XDG_DATA_HOME/gnupg"
-export VIMINIT='source $XDG_CONFIG_HOME/vim/vimrc'
+
+# Global programs
+export VIMINIT="if !has('nvim')
+source $XDG_CONFIG_HOME/vim/vimrc
+endif"
 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 LYNX_CFG="$XDG_CONFIG_HOME/lynx/lynx.cfg"
+export LYNX_LSS="$XDG_CONFIG_HOME/lynx/lynx.lss"
 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 TASKRC="$XDG_CONFIG_HOME/task/taskrc"
 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 XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority
 export WGETRC="$XDG_CONFIG_HOME/wgetrc"
 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 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"/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 "
+
+# Local executables
+export PATH=${PATH}:${HOME}/.local/bin:${XDG_DATA_HOME}/npm/bin:${XDG_DATA_HOME}/.cargo/bin
+
+chance() {
+    # Hit or miss
+    [ -f "${1}" ] && . "${1}"
+}
+
+there() {
+	# Checks the availability of an executable
+    type "$@" >/dev/null 2>/dev/null
+}
 
 # Setup editor
-export EDITOR=vim
+
 export VISUAL=vim
+export EDITOR="$(there nvi && echo nvi || echo vi)"
+export FUZZER=sk
+
+export BROWSER=lynx
+export SURFRAW_browser="$BROWSER"
 
+chance "${XDG_CONFIG_HOME}/sh/functions"
+chance "${XDG_CONFIG_HOME}/sh/aliases"
+chance "${XDG_CONFIG_HOME}/sh/unstaged"
diff --git a/X11.md b/X11.md
@@ -1,12 +0,0 @@
-# X11
-
-```
-# Launch firefox as user without xorg
-# .config/X11/xinitrc file should be cleared for this to work, otherwise it would launch i3
-xinit firefox $* -- :0 vt$XDG_VTNR
-
-
-# Configure xauth manually
-# $HOST was not defined in arch, I added it manually when using it
-xauth add ${HOST}:0 . $(xxd -l 16 -p /dev/urandom)
-```