mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 16:41:43 +05:30
- Not going to use wezterm
- Cleaned up $HOME directory - Adhered to XDG Base Directory Specification - Moved all common bash/zsh settings + Environment variables to .profiles
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
"extensions.ignoreRecommendations": true,
|
||||
|
||||
// Editor
|
||||
"editor.fontSize": 21, // Reduces the Activity Bar size
|
||||
"editor.fontSize": 20, // Reduces the Activity Bar size
|
||||
"editor.cursorWidth": 4,
|
||||
"editor.minimap.enabled": false,
|
||||
"editor.wordWrap": "on",
|
||||
@@ -29,9 +29,9 @@
|
||||
"diffEditor.ignoreTrimWhitespace": false,
|
||||
|
||||
// Editor Font
|
||||
"editor.fontFamily": "FuraCode Nerd Font",
|
||||
"editor.fontFamily": "JetBrainsMono Nerd Font",
|
||||
"editor.fontLigatures": true,
|
||||
"terminal.integrated.fontFamily": "FuraCode Nerd Font",
|
||||
"terminal.integrated.fontFamily": "JetBrainsMono Nerd Font",
|
||||
"terminal.integrated.fontSize": 20,
|
||||
|
||||
// Workbench - Everything that surrounds the editor
|
||||
@@ -226,6 +226,7 @@
|
||||
"terminal.integrated.shell.linux": "/bin/zsh",
|
||||
"debug.javascript.autoAttachFilter": "disabled",
|
||||
"debug.onTaskErrors": "debugAnyway",
|
||||
"vim.disableExtension": true
|
||||
"vim.disableExtension": true,
|
||||
"window.zoomLevel": -1
|
||||
//
|
||||
}
|
||||
|
||||
106
common/.config/ideavim/ideavimrc
Normal file
106
common/.config/ideavim/ideavimrc
Normal file
@@ -0,0 +1,106 @@
|
||||
" You can find a list of commands here: https://jb.gg/h38q75
|
||||
" Find more examples here: https://jb.gg/share-ideavimrc
|
||||
" Examples to map IDE actions to IdeaVim -- https://jb.gg/abva4t
|
||||
" Enable IdeaVim plugins https://jb.gg/ideavim-plugins
|
||||
|
||||
"source ~/.vimrc
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
source ~/.vim/configs.vim
|
||||
source ~/.vim/key_maps.vim
|
||||
|
||||
" Because :noh does not work in Jetbrains
|
||||
nnoremap <esc> <esc>
|
||||
inoremap <esc> <esc>
|
||||
|
||||
" Set Tabs to 4 characters
|
||||
set expandtab
|
||||
set tabstop=4
|
||||
set shiftwidth=4
|
||||
|
||||
" Searches
|
||||
set hlsearch " highlight search occurrences
|
||||
set ignorecase " ignore case in search patterns
|
||||
set smartcase " no ignore case when pattern is uppercase
|
||||
set incsearch " show search results while typing
|
||||
set wrapscan " searches wrap around the end of the file
|
||||
|
||||
" Common settings
|
||||
set gdefault " substitute all occurrences in line
|
||||
set clipboard^=unnamed,unnamedplus,ideaput " Copy to and from system clipboard
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Enabled plugins
|
||||
set ideajoin
|
||||
Plug 'easymotion/vim-easymotion' " <leader>j or J [2 characters]
|
||||
Plug 'preservim/nerdtree' " <leader>e
|
||||
Plug 'tpope/vim-surround' " ys or cs or ds [motion]
|
||||
Plug 'tpope/vim-commentary' " gc [motion]
|
||||
Plug 'machakann/vim-highlightedyank'
|
||||
Plug 'dbakker/vim-paragraph-motion'
|
||||
Plug 'chrisbra/matchit'
|
||||
Plug 'tpope/vim-repeat' " Repeat for Surround
|
||||
" Plug 'terryma/vim-multiple-cursors' " mc (selects), mx (skips), mp (previous)
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
" Map <leader>d to start debug
|
||||
"map <leader>d <Action>(Debug)
|
||||
" Map \b to toggle breakpoint
|
||||
"map \b <Action>(ToggleLineBreakpoint)
|
||||
|
||||
" Multiple Cursors
|
||||
map mc <A-n>
|
||||
map mx <A-x>
|
||||
map mp <A-p>
|
||||
|
||||
" Find/Open file
|
||||
nmap <leader>of :action GotoFile<CR>
|
||||
nmap <leader>or :action RecentFiles<CR>
|
||||
|
||||
" Find/Navigate to different parts of code
|
||||
nmap <leader>gf :action FindInPath<CR>
|
||||
nmap <leader>gr :action ShowUsages<CR>
|
||||
nmap <leader>gi :action GotoImplementation<CR>
|
||||
nmap <leader>gs :action GotoSuperMethod<CR>
|
||||
|
||||
" Tabs
|
||||
nmap <leader>tn :action NextTab<CR>
|
||||
nmap <leader>tp :action PreviousTab<CR>
|
||||
|
||||
" NerdTree
|
||||
nmap <leader>e :NERDTreeToggle<CR>
|
||||
" When in the tree use the below default keybindings
|
||||
" j, k - To go down and up
|
||||
" p - Go to the parent directory
|
||||
" P - Go the root directory
|
||||
" s - open file in vertical split
|
||||
" i - open in horizontal split
|
||||
" t - open in a new tab
|
||||
" o - Open the selected file or Expand the selected directory.
|
||||
" - Also collapse the same directory.
|
||||
" - Moves the cursor to the file.
|
||||
" go - Opens the file but keeps the cursor on the file tree
|
||||
" A - expand the file tree
|
||||
" x - close the file tree
|
||||
|
||||
nmap <C-p> :action ParameterInfo<CR>
|
||||
imap <C-p> <C-o>:action ParameterInfo<CR>
|
||||
nmap <leader>n :action GotoNextError<CR>
|
||||
map gh <Action>(ShowErrorDescription)
|
||||
|
||||
" Code refactoring
|
||||
nmap <leader>ri :action Inline<CR>
|
||||
nmap <leader>rr :action RenameElement<CR>
|
||||
nmap <leader>rev :action IntroduceVariable<CR>
|
||||
vmap <leader>rev :action IntroduceVariable<CR>
|
||||
nmap <leader>rem :action ExtractMethod<CR>
|
||||
vmap <leader>rem :action ExtractMethod<CR>
|
||||
nmap <leader>rm :action Move<CR>
|
||||
nmap <leader>ro :action OptimizeImports<CR>
|
||||
nmap <leader>rG :action Generate<CR>
|
||||
nmap <leader>rf :action ReformatCode<CR>
|
||||
|
||||
" Easy motion
|
||||
map <leader>j <Plug>(easymotion-s)
|
||||
|
||||
nmap <leader>gr :action Vcs.RollbackChangedLines<CR>
|
||||
173
common/.config/node/npmrc
Normal file
173
common/.config/node/npmrc
Normal file
@@ -0,0 +1,173 @@
|
||||
;;;;
|
||||
; npm userconfig file: /home/pratik/.npmrc
|
||||
; this is a simple ini-formatted file
|
||||
; lines that start with semi-colons are comments
|
||||
; run `npm help 7 config` for documentation of the various options
|
||||
;
|
||||
; Configs like `@scope:registry` map a scope to a given registry url.
|
||||
;
|
||||
; Configs like `//<hostname>/:_authToken` are auth that is restricted
|
||||
; to the registry host specified.
|
||||
|
||||
|
||||
|
||||
;;;;
|
||||
; all available options shown below with default values
|
||||
;;;;
|
||||
|
||||
|
||||
cache = ~/.cache/npm
|
||||
|
||||
; _auth=null
|
||||
; access=null
|
||||
; all=false
|
||||
; allow-same-version=false
|
||||
; also=null
|
||||
; audit=true
|
||||
; audit-level=null
|
||||
; auth-type=web
|
||||
; before=null
|
||||
; bin-links=true
|
||||
; browser=null
|
||||
; ca=null
|
||||
; cache=~/.npm
|
||||
; cache-max=null
|
||||
; cache-min=0
|
||||
; cafile=null
|
||||
; call=
|
||||
; cert=null
|
||||
; cidr=null
|
||||
; color=true
|
||||
; commit-hooks=true
|
||||
; cpu=null
|
||||
; os=null
|
||||
; libc=null
|
||||
; depth=null
|
||||
; description=true
|
||||
; dev=false
|
||||
;
|
||||
; diff-ignore-all-space=false
|
||||
; diff-name-only=false
|
||||
; diff-no-prefix=false
|
||||
; diff-dst-prefix=b/
|
||||
; diff-src-prefix=a/
|
||||
; diff-text=false
|
||||
; diff-unified=3
|
||||
; dry-run=false
|
||||
; editor=vi
|
||||
; engine-strict=false
|
||||
; fetch-retries=2
|
||||
; fetch-retry-factor=10
|
||||
; fetch-retry-maxtimeout=60000
|
||||
; fetch-retry-mintimeout=10000
|
||||
; fetch-timeout=300000
|
||||
; force=false
|
||||
; foreground-scripts=false
|
||||
; format-package-lock=true
|
||||
; fund=true
|
||||
; git=git
|
||||
; git-tag-version=true
|
||||
; global=false
|
||||
; globalconfig=
|
||||
; global-style=false
|
||||
; heading=npm
|
||||
; https-proxy=null
|
||||
; if-present=false
|
||||
; ignore-scripts=false
|
||||
;
|
||||
; include-staged=false
|
||||
; include-workspace-root=false
|
||||
; init-author-email=
|
||||
; init-author-name=
|
||||
; init-author-url=
|
||||
; init-license=ISC
|
||||
; init-module=~/.npm-init.js
|
||||
; init-version=1.0.0
|
||||
; init.author.email=
|
||||
; init.author.name=
|
||||
; init.author.url=
|
||||
; init.license=ISC
|
||||
; init.module=~/.npm-init.js
|
||||
; init.version=1.0.0
|
||||
; install-links=false
|
||||
; install-strategy=hoisted
|
||||
; json=false
|
||||
; key=null
|
||||
; legacy-bundling=false
|
||||
; legacy-peer-deps=false
|
||||
; link=false
|
||||
; local-address=null
|
||||
; sbom-format=null
|
||||
; sbom-type=library
|
||||
; location=user
|
||||
; lockfile-version=null
|
||||
; loglevel=notice
|
||||
; logs-dir=null
|
||||
; logs-max=10
|
||||
; long=false
|
||||
; maxsockets=15
|
||||
; message=%s
|
||||
; node-options=null
|
||||
; noproxy=
|
||||
; offline=false
|
||||
;
|
||||
; omit-lockfile-registry-resolved=false
|
||||
; only=null
|
||||
; optional=null
|
||||
; otp=null
|
||||
;
|
||||
; package-lock=true
|
||||
; package-lock-only=false
|
||||
; pack-destination=.
|
||||
; parseable=false
|
||||
; prefer-dedupe=false
|
||||
; prefer-offline=false
|
||||
; prefer-online=false
|
||||
; prefix=
|
||||
; preid=
|
||||
; production=null
|
||||
; progress=true
|
||||
; provenance=false
|
||||
; provenance-file=null
|
||||
; proxy=null
|
||||
; read-only=false
|
||||
; rebuild-bundle=true
|
||||
; registry=https://registry.npmjs.org/
|
||||
; replace-registry-host=npmjs
|
||||
; save=true
|
||||
; save-bundle=false
|
||||
; save-dev=false
|
||||
; save-exact=false
|
||||
; save-optional=false
|
||||
; save-peer=false
|
||||
; save-prefix=^
|
||||
; save-prod=false
|
||||
; scope=
|
||||
; script-shell=null
|
||||
; searchexclude=
|
||||
; searchlimit=20
|
||||
; searchopts=
|
||||
; searchstaleness=900
|
||||
; shell=/usr/bin/zsh
|
||||
; shrinkwrap=true
|
||||
; sign-git-commit=false
|
||||
; sign-git-tag=false
|
||||
; strict-peer-deps=false
|
||||
; strict-ssl=true
|
||||
; tag=latest
|
||||
; tag-version-prefix=v
|
||||
; timing=false
|
||||
; umask=0
|
||||
; unicode=true
|
||||
; update-notifier=true
|
||||
; usage=false
|
||||
; user-agent=npm/{npm-version} node/{node-version} {platform} {arch} workspaces/{workspaces} {ci}
|
||||
; userconfig=~/.npmrc
|
||||
; version=false
|
||||
; versions=false
|
||||
; viewer=man
|
||||
; which=null
|
||||
;
|
||||
; workspaces=null
|
||||
; workspaces-update=true
|
||||
; yes=null
|
||||
Submodule common/.config/nvim_switch/nvchad updated: c2ec317b1b...b22c7b37c3
94
common/.config/shell/aliases
Normal file
94
common/.config/shell/aliases
Normal file
@@ -0,0 +1,94 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Generic
|
||||
alias sb="source ~/.bashrc"
|
||||
alias bashreload="source ~/.bashrc"
|
||||
alias sz="source ~/.zshrc"
|
||||
alias zshreload="source ~/.zshrc"
|
||||
alias bashrc="${EDITOR:-vim} +116 ~/.bashrc"
|
||||
alias zshrc="${EDITOR:-vim} ~/.zshrc"
|
||||
alias free="free -ht"
|
||||
alias type="type -a"
|
||||
alias grep='grep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias usersearch="awk -F: '{print \"UserName: \" \$1 \", UserID: \" \$3 \", Home Dir: \" \$6 \", Shell Used: \" \$7}' /etc/passwd | grep"
|
||||
alias untar='tar -zxvf '
|
||||
alias v=nvim
|
||||
alias n=nvim
|
||||
alias wget="wget --hsts-file ${WGET_HSTS_FILE}"
|
||||
|
||||
url_encode(){
|
||||
python3 -c "import urllib.parse, sys; print(urllib.parse.quote(sys.stdin.read()))" <<< "$1"
|
||||
}
|
||||
|
||||
|
||||
# History
|
||||
alias histsearch="history | grep"
|
||||
alias hs="histsearch"
|
||||
alias hsi="histsearch"
|
||||
|
||||
|
||||
# Directories and Directory listings
|
||||
alias ~="cd ~"
|
||||
alias ..="cd .."
|
||||
alias ...='cd ../../../' # Go back 3 directory levels
|
||||
alias cd_root='cd $(git rev-parse --show-toplevel 2>/dev/null || echo ".")'
|
||||
alias cd_git_root=cd_root
|
||||
alias c=clear
|
||||
alias cl=clear
|
||||
alias lsc='ls --color=auto --hyperlink=auto'
|
||||
alias ll='lsc -alhF'
|
||||
alias la='lsc -Ah'
|
||||
alias l='lsc -CF'
|
||||
alias lsa="lsc -lAFhZ"
|
||||
alias mkdir="mkdir -pv"
|
||||
alias df="df -h"
|
||||
mkcd () {
|
||||
mkdir "$1"
|
||||
cd "$1" || exit
|
||||
}
|
||||
|
||||
|
||||
# Network
|
||||
alias ping="ping -c 10"
|
||||
alias ping8="ping 8.8.8.8"
|
||||
alias ping1="ping 1.1.1.1"
|
||||
alias p8="ping8"
|
||||
alias p1="ping1"
|
||||
alias pubip="curl https://ipinfo.io/ip; echo"
|
||||
alias speedtest="speedtest-cli --secure" # needs speedtest-cli installed
|
||||
geoip () {
|
||||
curl -s https://ipinfo.io | sed '/readme/d;/loc/d;/postal/d;s/org/ISP/' | tr -d {},\" | awk -F ':' 'NF {printf ("%10s: %.25s \n", $1, $2)}'
|
||||
}
|
||||
|
||||
|
||||
# Git
|
||||
# To use this - Ensure all git server SSH are in ~/.ssh
|
||||
alias git_signin='(for i in ~/.ssh/{*github*,*gitea*}; do ssh-add -k $i; done; ) && (echo; echo Identities added successfully)'
|
||||
git_push_all_changes(){
|
||||
git add . && git commit -am "${1}" && git push
|
||||
}
|
||||
|
||||
|
||||
alias ta="tmux a"
|
||||
alias tat="tmux a -t"
|
||||
alias tls="tmux ls"
|
||||
alias tnew="tmux new"
|
||||
alias tnewt="tmux new -t"
|
||||
|
||||
# Nvim Distro-Switcher
|
||||
alias nvim-lazy=nvim
|
||||
alias OldConfig="NVIM_APPNAME=oldconfig nvim"
|
||||
alias nvim-chad="NVIM_APPNAME=nvchad nvim"
|
||||
nvims() {
|
||||
items=$(find -L "$HOME"/.config -maxdepth 2 -name "init.lua" -type f -execdir sh -c 'pwd | xargs basename' \;)
|
||||
config=$(printf "%s\n" "${items[@]}" | fzf --prompt=" Neovim Config " --height=~50% --layout=reverse --border --exit-0)
|
||||
if [[ -z $config ]]; then
|
||||
echo "Nothing selected"
|
||||
return 0
|
||||
elif [[ $config == "default" ]]; then
|
||||
config=""
|
||||
fi
|
||||
NVIM_APPNAME=$config nvim $@
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
local wezterm = require("wezterm")
|
||||
|
||||
return {
|
||||
color_scheme = "Catppuccin Mocha",
|
||||
font_size = 14.0,
|
||||
font = wezterm.font_with_fallback({
|
||||
"JetBrainsMono Nerd Font",
|
||||
{ family = "Symbols Nerd Font Mono", scale = 0.75 },
|
||||
}),
|
||||
window_decorations = "RESIZE",
|
||||
enable_tab_bar = true,
|
||||
use_fancy_tab_bar = true,
|
||||
hide_tab_bar_if_only_one_tab = true,
|
||||
win32_system_backdrop = "Mica",
|
||||
macos_window_background_blur = 80,
|
||||
|
||||
window_padding = {
|
||||
left = 0,
|
||||
right = 0,
|
||||
top = 0,
|
||||
bottom = 0,
|
||||
},
|
||||
|
||||
keys = {
|
||||
{
|
||||
key = "f",
|
||||
mods = "ALT",
|
||||
action = wezterm.action.ToggleFullScreen,
|
||||
},
|
||||
},
|
||||
|
||||
mouse_bindings = {
|
||||
{
|
||||
event = { Up = { streak = 1, button = "Left" } },
|
||||
mods = "CTRL",
|
||||
action = wezterm.action.OpenLinkAtMouseCursor,
|
||||
},
|
||||
},
|
||||
|
||||
force_reverse_video_cursor = true,
|
||||
colors = {
|
||||
foreground = "#dcd7ba",
|
||||
background = "#1f1f28",
|
||||
|
||||
cursor_bg = "#c8c093",
|
||||
cursor_fg = "#c8c093",
|
||||
cursor_border = "#c8c093",
|
||||
|
||||
selection_fg = "#c8c093",
|
||||
selection_bg = "#2d4f67",
|
||||
|
||||
scrollbar_thumb = "#16161d",
|
||||
split = "#16161d",
|
||||
|
||||
ansi = { "#090618", "#c34043", "#76946a", "#c0a36e", "#7e9cd8", "#957fb8", "#6a9589", "#c8c093" },
|
||||
brights = { "#727169", "#e82424", "#98bb6c", "#e6c384", "#7fb4ca", "#938aa9", "#7aa89f", "#dcd7ba" },
|
||||
indexed = { [16] = "#ffa066", [17] = "#ff5d62" },
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user