mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 08: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:
202
common/.bashrc
202
common/.bashrc
@@ -4,8 +4,8 @@
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
case $- in
|
||||
*i*) ;;
|
||||
*) return ;;
|
||||
*i*) ;;
|
||||
*) return ;;
|
||||
esac
|
||||
|
||||
# append to the history file, don't overwrite it
|
||||
@@ -24,12 +24,12 @@ shopt -s checkwinsize
|
||||
|
||||
# set variable identifying the chroot you work in (used in the prompt below)
|
||||
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
||||
debian_chroot=$(cat /etc/debian_chroot)
|
||||
debian_chroot=$(cat /etc/debian_chroot)
|
||||
fi
|
||||
|
||||
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||
case "$TERM" in
|
||||
xterm-color|*-256color) color_prompt=yes ;;
|
||||
xterm-color | *-256color) color_prompt=yes ;;
|
||||
esac
|
||||
|
||||
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||
@@ -38,41 +38,40 @@ esac
|
||||
#force_color_prompt=yes
|
||||
|
||||
if [ -n "$force_color_prompt" ]; then
|
||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||
# We have color support; assume it's compliant with Ecma-48
|
||||
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||
# a case would tend to support setf rather than setaf.)
|
||||
color_prompt=yes
|
||||
else
|
||||
color_prompt=
|
||||
fi
|
||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||
# We have color support; assume it's compliant with Ecma-48
|
||||
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||
# a case would tend to support setf rather than setaf.)
|
||||
color_prompt=yes
|
||||
else
|
||||
color_prompt=
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$color_prompt" != yes ]; then
|
||||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||
fi
|
||||
|
||||
unset color_prompt force_color_prompt
|
||||
|
||||
# If this is an xterm set the title to user@host:dir
|
||||
case "$TERM" in
|
||||
xterm*|rxvt*)
|
||||
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
xterm* | rxvt*)
|
||||
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
|
||||
# enable color support of ls and also add handy aliases
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias ls='ls --color=auto'
|
||||
#alias dir='dir --color=auto'
|
||||
#alias vdir='vdir --color=auto'
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias ls='ls --color=auto'
|
||||
#alias dir='dir --color=auto'
|
||||
#alias vdir='vdir --color=auto'
|
||||
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
fi
|
||||
|
||||
# colored GCC warnings and errors
|
||||
@@ -82,24 +81,15 @@ 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
|
||||
|
||||
# enable programmable completion features (you don't need to enable
|
||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||
# sources /etc/bash.bashrc).
|
||||
if ! shopt -oq posix; then
|
||||
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||
. /usr/share/bash-completion/bash_completion
|
||||
elif [ -f /etc/bash_completion ]; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||
. /usr/share/bash-completion/bash_completion
|
||||
elif [ -f /etc/bash_completion ]; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
@@ -108,12 +98,6 @@ fi
|
||||
################################################################################
|
||||
################################################################################
|
||||
|
||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||
HISTSIZE=-1
|
||||
HISTFILESIZE=-1
|
||||
HISTCONTROL=ignorespace
|
||||
HISTTIMEFORMAT="%H:%M:%S(%z)%d-%b-%y "
|
||||
|
||||
# Do not let globbing complain on no match
|
||||
shopt -s nullglob
|
||||
|
||||
@@ -121,7 +105,7 @@ shopt -s nullglob
|
||||
shopt -s autocd
|
||||
|
||||
function timer_start {
|
||||
timer=${timer:-$SECONDS}
|
||||
timer=${timer:-$SECONDS}
|
||||
}
|
||||
|
||||
trap 'timer_start' DEBUG
|
||||
@@ -129,84 +113,72 @@ trap 'timer_start' DEBUG
|
||||
PROMPT_COMMAND=jazz_my_prompt
|
||||
|
||||
jazz_my_prompt() {
|
||||
# Capture exit code of last command
|
||||
# Below MUST be the 1st line of the function
|
||||
local ex=$?
|
||||
# Capture exit code of last command
|
||||
# Below MUST be the 1st line of the function
|
||||
local ex=$?
|
||||
|
||||
# Capture the last command's execution time
|
||||
timer_show=$(($SECONDS - $timer))
|
||||
unset timer
|
||||
# Capture the last command's execution time
|
||||
timer_show=$(($SECONDS - $timer))
|
||||
unset timer
|
||||
|
||||
#----------------------------------------------------------------------------#
|
||||
# Bash text colour specification: \e[<COLOUR>;<STYLE>m
|
||||
# Colours: 31=red, 32=green, 33=yellow, 34=blue, 35=purple, 36=cyan, 37=white
|
||||
# Styles: 0=normal, 1=bold, 2=dimmed, 4=underlined, 7=highlighted
|
||||
#----------------------------------------------------------------------------#
|
||||
#----------------------------------------------------------------------------#
|
||||
# Bash text colour specification: \e[<COLOUR>;<STYLE>m
|
||||
# Colours: 31=red, 32=green, 33=yellow, 34=blue, 35=purple, 36=cyan, 37=white
|
||||
# Styles: 0=normal, 1=bold, 2=dimmed, 4=underlined, 7=highlighted
|
||||
#----------------------------------------------------------------------------#
|
||||
|
||||
local reset="\[\e[0m\]"
|
||||
local normal=';0m'
|
||||
local bold=';1m'
|
||||
local boldyellow="\[\e[32${bold}\]"
|
||||
local boldwhite="\[\e[37${bold}\]"
|
||||
local normalwhite="\[\e[37${normal}\]"
|
||||
local yellow_highlight="\[\e[31;7m\]"
|
||||
local reset="\[\e[0m\]"
|
||||
local normal=';0m'
|
||||
local bold=';1m'
|
||||
local boldyellow="\[\e[32${bold}\]"
|
||||
local boldwhite="\[\e[37${bold}\]"
|
||||
local normalwhite="\[\e[37${normal}\]"
|
||||
local yellow_highlight="\[\e[31;7m\]"
|
||||
|
||||
# Add color preference BEFORE the item
|
||||
local hostname="${normalwhite}\h"
|
||||
local username="${boldwhite}\u"
|
||||
local jobs="${boldwhite}jobs:\j"
|
||||
local history_cnt="${normalwhite}!\!"
|
||||
local timestamp="${normalwhite}\D{%H:%M:%S(%z) %d%b}"
|
||||
local session_cmd_cnt="${normalwhite}#\#"
|
||||
local pwd="${boldwhite}\w"
|
||||
local isroot="${boldwhite}\$"
|
||||
# Add color preference BEFORE the item
|
||||
local hostname="${normalwhite}\h"
|
||||
local username="${boldwhite}\u"
|
||||
local jobs="${boldwhite}jobs:\j"
|
||||
local history_cnt="${normalwhite}!\!"
|
||||
local timestamp="${normalwhite}\D{%H:%M:%S(%z) %d%b}"
|
||||
local session_cmd_cnt="${normalwhite}#\#"
|
||||
local pwd="${boldwhite}\w"
|
||||
local isroot="${boldwhite}\$"
|
||||
|
||||
# Set prompt content
|
||||
# If exit code of last command is non-zero, prepend this code to the prompt
|
||||
local exit_code=''
|
||||
if [[ "$ex" -eq 0 ]]
|
||||
then
|
||||
exit_code="${boldwhite}✓"
|
||||
else
|
||||
exit_code="${yellow_highlight}✗ $ex\a${reset}"
|
||||
fi
|
||||
# Set prompt content
|
||||
# If exit code of last command is non-zero, prepend this code to the prompt
|
||||
local exit_code=''
|
||||
if [[ "$ex" -eq 0 ]]; then
|
||||
exit_code="${boldwhite}✓"
|
||||
else
|
||||
exit_code="${yellow_highlight}✗ $ex\a${reset}"
|
||||
fi
|
||||
|
||||
# Style each group separately
|
||||
local groupstart="${boldyellow}["
|
||||
local groupend="${boldyellow}]"
|
||||
group1="${groupstart}${username}@${hostname}${groupend}"
|
||||
group2="${groupstart}${jobs}${groupend}"
|
||||
group3="${groupstart}${history_cnt}${groupend}"
|
||||
group4="${groupstart}${session_cmd_cnt}${groupend}"
|
||||
group5="${groupstart}${timestamp}${groupend}"
|
||||
group6="${groupstart}${exit_code}${groupend}"
|
||||
group8="${groupstart}${pwd}${groupend}"
|
||||
group9="${groupstart}${normalwhite}${timer_show}s${groupend}"
|
||||
# Style each group separately
|
||||
local groupstart="${boldyellow}["
|
||||
local groupend="${boldyellow}]"
|
||||
group1="${groupstart}${username}@${hostname}${groupend}"
|
||||
group2="${groupstart}${jobs}${groupend}"
|
||||
group3="${groupstart}${history_cnt}${groupend}"
|
||||
group4="${groupstart}${session_cmd_cnt}${groupend}"
|
||||
group5="${groupstart}${timestamp}${groupend}"
|
||||
group6="${groupstart}${exit_code}${groupend}"
|
||||
group8="${groupstart}${pwd}${groupend}"
|
||||
group9="${groupstart}${normalwhite}${timer_show}s${groupend}"
|
||||
|
||||
# Position each group where you would like them
|
||||
PS1="\n${group1}-${group2}-${group3}-${group4}-${group5}\n${group6}-${group9}-${group8}\n${isroot}${reset} "
|
||||
# Position each group where you would like them
|
||||
PS1="\n${group1}-${group2}-${group3}-${group4}-${group5}\n${group6}-${group9}-${group8}\n${isroot}${reset} "
|
||||
}
|
||||
|
||||
# Setup path and export variables
|
||||
[[ ! -f ~/.env ]] || source ~/.env
|
||||
[[ ! -f ~/.set_path ]] || source ~/.set_path
|
||||
[[ ! -f "$HOME/.cargo/env" ]] || source "$HOME/.cargo/env"
|
||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||
HISTSIZE=-1
|
||||
HISTFILESIZE=-1
|
||||
HISTCONTROL=ignorespace
|
||||
HISTTIMEFORMAT="%H:%M:%S(%z)%d-%b-%y "
|
||||
HISTFILE="$XDG_STATE_HOME/shell/bash_history"
|
||||
|
||||
# Aliases
|
||||
[[ ! -f ~/.aliases ]] || source ~/.aliases
|
||||
[[ ! -f ~/.aliases_mac ]] || source ~/.aliases_mac
|
||||
[[ ! -f ~/.aliases_neon ]] || source ~/.aliases_neon
|
||||
[[ ! -f ~/.aliases_personal ]] || source ~/.aliases_personal
|
||||
[ ! -f "$XDG_CONFIG_HOME/exercism/exercism_completion.bash" ] || source "$XDG_CONFIG_HOME/exercism/exercism_completion.bash"
|
||||
|
||||
# nvm Setup
|
||||
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
|
||||
[[ ! -f ~/.config/exercism/exercism_completion.bash ]] || source ~/.config/exercism/exercism_completion.bash
|
||||
export QT_PLUGIN_PATH=~/.local/lib/qt/plugins/:
|
||||
|
||||
eval "$(ssh-agent -s)"
|
||||
if command -v zoxide > /dev/null; then
|
||||
eval "$(zoxide init bash)"
|
||||
if command -v zoxide >/dev/null; then
|
||||
eval "$(zoxide init bash)"
|
||||
fi
|
||||
|
||||
@@ -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
|
||||
//
|
||||
}
|
||||
|
||||
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
@@ -16,6 +16,7 @@ alias usersearch="awk -F: '{print \"UserName: \" \$1 \", UserID: \" \$3 \", Home
|
||||
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"
|
||||
@@ -36,7 +37,7 @@ 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'
|
||||
alias lsc='ls --color=auto --hyperlink=auto'
|
||||
alias ll='lsc -alhF'
|
||||
alias la='lsc -Ah'
|
||||
alias l='lsc -CF'
|
||||
@@ -77,10 +78,11 @@ alias tnew="tmux new"
|
||||
alias tnewt="tmux new -t"
|
||||
|
||||
# Nvim Distro-Switcher
|
||||
alias nvim-lazy="NVIM_APPNAME=lazyvim nvim"
|
||||
alias nvim-lazy=nvim
|
||||
alias OldConfig="NVIM_APPNAME=oldconfig nvim"
|
||||
alias nvim-chad="NVIM_APPNAME=nvchad nvim"
|
||||
function nvims() {
|
||||
items=$(find -L $HOME/.config -maxdepth 2 -name "init.lua" -type f -execdir sh -c 'pwd | xargs basename' \;)
|
||||
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"
|
||||
@@ -90,4 +92,3 @@ function nvims() {
|
||||
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" },
|
||||
},
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
# Setup Shared cache for Rust
|
||||
export RUSTC_WRAPPER=sccache
|
||||
export SCCACHE_CACHE_SIZE="20G"
|
||||
|
||||
# Optout of dotnetcore telemetry
|
||||
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||
1603
common/.p10k.zsh
1603
common/.p10k.zsh
File diff suppressed because it is too large
Load Diff
108
common/.profile
108
common/.profile
@@ -1,27 +1,93 @@
|
||||
# ~/.profile: executed by the command interpreter for login shells.
|
||||
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
|
||||
# exists.
|
||||
# see /usr/share/doc/bash/examples/startup-files for examples.
|
||||
# the files are located in the bash-doc package.
|
||||
|
||||
# the default umask is set in /etc/profile; for setting the umask
|
||||
# for ssh logins, install and configure the libpam-umask package.
|
||||
#umask 022
|
||||
|
||||
# if running bash
|
||||
if [ -n "$BASH_VERSION" ]; then
|
||||
# include .bashrc if it exists
|
||||
if [ -f "$HOME/.bashrc" ]; then
|
||||
. "$HOME/.bashrc"
|
||||
fi
|
||||
# set PATH so it includes user's private bin if it exists
|
||||
if [ -d "$HOME/bin" ]; then
|
||||
PATH="$HOME/bin:$PATH"
|
||||
fi
|
||||
|
||||
# set PATH so it includes user's private bin if it exists
|
||||
if [ -d "$HOME/bin" ] ; then
|
||||
PATH="$HOME/bin:$PATH"
|
||||
if [ -d "$HOME/.local/bin" ]; then
|
||||
PATH="$HOME/.local/bin:$PATH"
|
||||
fi
|
||||
|
||||
# set PATH so it includes user's private bin if it exists
|
||||
if [ -d "$HOME/.local/bin" ] ; then
|
||||
PATH="$HOME/.local/bin:$PATH"
|
||||
# Set the config directory enviroment variable
|
||||
if [ -z "$XDG_CONFIG_HOME" ]; then
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
fi
|
||||
|
||||
# Set the cache directory enviroment variable
|
||||
if [ -z "$XDG_CACHE_HOME" ]; then
|
||||
export XDG_CACHE_HOME="$HOME/.cache"
|
||||
fi
|
||||
|
||||
# Set the data directory enviroment variable
|
||||
if [ -z "$XDG_DATA_HOME" ]; then
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
fi
|
||||
|
||||
# Set the state directory enviroment variable
|
||||
if [ -z "$XDG_STATE_HOME" ]; then
|
||||
export XDG_STATE_HOME="$HOME/.local/state"
|
||||
fi
|
||||
|
||||
##################################################################################
|
||||
|
||||
eval "$(ssh-agent -s)" >/dev/null
|
||||
ulimit -n 10240
|
||||
|
||||
# Manually follow steps from https://steamcommunity.com/app/646570/discussions/1/3935537639868400686
|
||||
# To disable ~/.oracle_jre_usage/ from being created
|
||||
|
||||
# Source aliases
|
||||
[ ! -f "$XDG_CONFIG_HOME/shell/aliases" ] || source "$XDG_CONFIG_HOME/shell/aliases"
|
||||
[ ! -f "$XDG_CONFIG_HOME/shell/aliases_mac" ] || source "$XDG_CONFIG_HOME/shell/aliases_mac"
|
||||
[ ! -f "$XDG_CONFIG_HOME/shell/aliases_neon" ] || source "$XDG_CONFIG_HOME/shell/aliases_neon"
|
||||
[ ! -f "$XDG_CONFIG_HOME/shell/aliases_personal" ] || source "$XDG_CONFIG_HOME/shell/aliases_personal"
|
||||
|
||||
if [ "$(uname -s)" = "Linux" ]; then
|
||||
export QT_PLUGIN_PATH="~/.local/lib/qt/plugins/:"
|
||||
export __GL_SHADER_DISK_CACHE_PATH="$XDG_CACHE_HOME/nvidia"
|
||||
|
||||
# Needs upstream fix to work: https://bugs.kde.org/show_bug.cgi?id=415770
|
||||
export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc-2.0"
|
||||
|
||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||
fi
|
||||
|
||||
if [ "$XDG_SESSION_DESKTOP" = "KDE" ]; then
|
||||
export KDEHOME="$XDG_CONFIG_HOME/KDE"
|
||||
fi
|
||||
|
||||
export GNUPGHOME="$XDG_CONFIG_HOME/gnupg"
|
||||
export LESSHISTFILE="$XDG_STATE_HOME/shell/lesshst"
|
||||
export WGET_HSTS_FILE="$XDG_STATE_HOME/shell/wget-hsts-history" # wget aliased to use this path
|
||||
|
||||
# Move the Android device keys to .config (TODO: This needs to be tested)
|
||||
export ADB_VENDOR_KEYS="$XDG_CONFIG_HOME/android"
|
||||
|
||||
# Setup Python
|
||||
export PYENV_ROOT="$XDG_DATA_HOME/pyenv"
|
||||
command -v pyenv >/dev/null || export PATH="$PATH:$PYENV_ROOT/bin"
|
||||
command -v pyenv >/dev/null || eval "$(pyenv init -)"
|
||||
export PYTHON_HISTORY="$XDG_STATE_HOME/shell/python_history" # will become availble in python 3.13
|
||||
|
||||
# Setup Rust
|
||||
export CARGO_HOME="$XDG_DATA_HOME/rust/cargo"
|
||||
export RUSTUP_HOME="$XDG_DATA_HOME/rust/rustup"
|
||||
export PATH="$PATH:$CARGO_HOME/bin"
|
||||
export RUSTC_WRAPPER=sccache # Setup Shared cache for Rust
|
||||
export SCCACHE_CACHE_SIZE="20G"
|
||||
|
||||
# Setup DotNet
|
||||
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||
export DOTNET_CLI_HOME="$XDG_CONFIG_HOME/dotnet"
|
||||
|
||||
# Setup Node & nvm
|
||||
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/node/npmrc"
|
||||
export NODE_REPL_HISTORY="$XDG_CONFIG_HOME/node/node_repl_history"
|
||||
export NVM_DIR="$XDG_DATA_HOME/nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
|
||||
|
||||
export AWS_CONFIG_FILE="$XDG_CONFIG_HOME/aws/config"
|
||||
export AWS_SHARED_CREDENTIALS_FILE="$XDG_CONFIG_HOME/aws/credentials"
|
||||
|
||||
export DOCKER_CONFIG="$XDG_CONFIG_HOME/docker"
|
||||
|
||||
@@ -99,7 +99,6 @@ nnoremap <leader>/ :nohlsearch<CR>:diffupdate<CR>:normal! <C-L><CR>
|
||||
" Changes the pwd to the opened file's directory
|
||||
nnoremap <leader>cd :lcd %:h<CR>
|
||||
|
||||
|
||||
" Map easymotion Plugin to <Leader>j
|
||||
nnoremap <leader>j <Plug>(easymotion-s)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
let $VIMDIR="$HOME/.vim"
|
||||
let $VIMDIR=expand($HOME)."/.vim"
|
||||
let $VIMRC="$VIMDIR/vimrc"
|
||||
|
||||
" Load plugins
|
||||
@@ -26,6 +26,8 @@ colorscheme deep-space
|
||||
" VIM SPECIFIC CONFIG
|
||||
"
|
||||
""""""""""""""""""""""""""""""""
|
||||
" Move the .viminfo file inside .vim directory
|
||||
set viminfofile=$VIMDIR/viminfo
|
||||
|
||||
" Auto reload .vimrc
|
||||
autocmd! bufwritepost $VIMRC source %
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
# I'm not using a separate .zprofile; reuse the .profile instead
|
||||
[ ! -f "$HOME/.profile" ] || source "$HOME/.profile"
|
||||
|
||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
||||
# Initialization code that may require console input (password prompts, [y/n]
|
||||
# confirmations, etc.) must go above this block; everything else may go below.
|
||||
@@ -9,14 +12,9 @@ fi
|
||||
# export PATH=$HOME/bin:/usr/local/bin:$PATH
|
||||
|
||||
# Path to your oh-my-zsh installation.
|
||||
export ZSH="/home/pratik/.oh-my-zsh"
|
||||
export ZSH="$XDG_CONFIG_HOME/shell/oh-my-zsh"
|
||||
source "${ZSH}/custom/themes/powerlevel10k/powerlevel10k.zsh-theme"
|
||||
|
||||
# Set name of the theme to load --- if set to "random", it will
|
||||
# load a random theme each time oh-my-zsh is loaded, in which case,
|
||||
# to know which specific one was loaded, run: echo $RANDOM_THEME
|
||||
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
|
||||
# ZSH_THEME="robbyrussell"
|
||||
POWERLEVEL9K_MODE='awesome-fontconfig'
|
||||
ZSH_THEME="powerlevel10k/powerlevel10k"
|
||||
|
||||
# Uncomment the following line to use case-sensitive completion.
|
||||
@@ -27,7 +25,7 @@ CASE_SENSITIVE="true"
|
||||
# HYPHEN_INSENSITIVE="true"
|
||||
|
||||
# Uncomment the following line to automatically update without prompting.
|
||||
# DISABLE_UPDATE_PROMPT="true"
|
||||
DISABLE_UPDATE_PROMPT="true"
|
||||
|
||||
# Uncomment the following line if pasting URLs and other text is messed up.
|
||||
# DISABLE_MAGIC_FUNCTIONS="true"
|
||||
@@ -49,44 +47,40 @@ HIST_STAMPS="dd.mm.yyyy"
|
||||
|
||||
# Standard plugins can be found in $ZSH/plugins/
|
||||
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
|
||||
# source ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
plugins=(
|
||||
git
|
||||
docker
|
||||
history
|
||||
# dotenv
|
||||
# colored-man-pages
|
||||
# docker
|
||||
# fd
|
||||
# nvm
|
||||
per-directory-history
|
||||
perms
|
||||
# ripgrep
|
||||
sudo
|
||||
systemd
|
||||
zsh-syntax-highlighting
|
||||
zsh-autosuggestions
|
||||
vi-mode
|
||||
# exercism
|
||||
)
|
||||
VI_MODE_SET_CURSOR=true
|
||||
VI_MODE_CURSOR_INSERT=3
|
||||
zstyle ':omz:plugins:nvm' lazy yes
|
||||
HISTORY_BASE="$XDG_STATE_HOME/shell/per-directory-history"
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
compinit -d "$XDG_CACHE_HOME/zcompdump"
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||
[[ ! -f "$XDG_CONFIG_HOME/shell/p10k.zsh" ]] || source "$XDG_CONFIG_HOME/shell/p10k.zsh"
|
||||
|
||||
# User configuration
|
||||
|
||||
##############Pratik POWERLEVEL9K Configs####################################
|
||||
POWERLEVEL9K_INSTANT_PROMPT=off
|
||||
|
||||
POWERLEVEL9K_SHORTEN_DIR_LENGTH=4
|
||||
POWERLEVEL9K_TIME_FORMAT="%D{%H:%M:%S %a}"
|
||||
POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=0
|
||||
POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=6
|
||||
|
||||
POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
|
||||
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os_icon user ssh dir_writable dir background_jobs docker_machine command_execution_time time newline history status root_indicator)
|
||||
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=()
|
||||
|
||||
##############Pratik POWERLEVEL9K Configs END################################
|
||||
|
||||
setopt +o nomatch
|
||||
|
||||
# Higher History
|
||||
export HISTSIZE=10000000
|
||||
export SAVEHIST=10000000
|
||||
export HISTFILE="$XDG_STATE_HOME/shell/zsh_history"
|
||||
setopt EXTENDED_HISTORY # Write the history file in the ":start:elapsed;command" format.
|
||||
setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits.
|
||||
setopt SHARE_HISTORY # Share history between all sessions.
|
||||
@@ -94,38 +88,11 @@ setopt HIST_REDUCE_BLANKS # Remove superfluous blanks before recording e
|
||||
setopt HIST_VERIFY # Don't execute immediately upon history expansion.
|
||||
setopt HIST_IGNORE_SPACE # Don't add commands that start with whitespace to history
|
||||
|
||||
##############Bring all the alias and setup scripts################################
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
|
||||
# enable vi-mode
|
||||
bindkey -v
|
||||
|
||||
# Setup path and export variables
|
||||
[[ ! -f ~/.env ]] || source ~/.env
|
||||
[[ ! -f ~/.set_path ]] || source ~/.set_path
|
||||
[[ ! -f "$HOME/.cargo/env" ]] || source "$HOME/.cargo/env"
|
||||
export PYENV_ROOT="$HOME/.pyenv"
|
||||
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
eval "$(pyenv init -)"
|
||||
PATH=$(pyenv root)/shims:$PATH
|
||||
# [ ! -f "$XDG_CONFIG_HOME/exercism/exercism_completion.zsh" ] || source "$XDG_CONFIG_HOME/exercism/exercism_completion.zsh"
|
||||
|
||||
# Aliases
|
||||
[[ ! -f ~/.aliases ]] || source ~/.aliases
|
||||
[[ ! -f ~/.aliases_mac ]] || source ~/.aliases_mac
|
||||
[[ ! -f ~/.aliases_neon ]] || source ~/.aliases_neon
|
||||
[[ ! -f ~/.aliases_personal ]] || source ~/.aliases_personal
|
||||
|
||||
# nvm Setup
|
||||
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
|
||||
[[ ! -f ~/.config/exercism/exercism_completion.bash ]] || source ~/.config/exercism/exercism_completion.bash
|
||||
|
||||
eval "$(ssh-agent -s)" > /dev/null
|
||||
ulimit -n 10240
|
||||
if command -v zoxide > /dev/null; then
|
||||
eval "$(zoxide init zsh)"
|
||||
if command -v zoxide >/dev/null; then
|
||||
eval "$(zoxide init zsh)"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user