From 6101e4c230f8feab0635d847fa346b707bf83e5c Mon Sep 17 00:00:00 2001 From: Riz Ashraf Date: Tue, 7 Apr 2026 00:07:07 +0100 Subject: [PATCH] Capture --- dot_bashrc | 5 + dot_config/ghostty/config | 74 +++++++++++ dot_config/lazydocker/empty_config.yml | 0 dot_config/lazygit/empty_config.yml | 0 dot_config/starship_linux.toml | 31 +++++ dot_config/symlink_nvim | 1 + dot_curlrc | 1 + dot_profile | 31 +++++ dot_tmux.conf | 49 +++++++ dot_wgetrc | 2 + dot_zprofile | 1 + dot_zshenv | 1 + dot_zshrc | 173 ++++++++++++++++++++----- symlink_dot_ssh | 1 + 14 files changed, 334 insertions(+), 36 deletions(-) create mode 100644 dot_config/ghostty/config create mode 100644 dot_config/lazydocker/empty_config.yml create mode 100644 dot_config/lazygit/empty_config.yml create mode 100644 dot_config/starship_linux.toml create mode 100644 dot_config/symlink_nvim create mode 100644 dot_curlrc create mode 100644 dot_profile create mode 100644 dot_tmux.conf create mode 100644 dot_wgetrc create mode 100644 dot_zprofile create mode 100644 dot_zshenv create mode 100644 symlink_dot_ssh diff --git a/dot_bashrc b/dot_bashrc index 25b68ff..e84ae38 100644 --- a/dot_bashrc +++ b/dot_bashrc @@ -121,3 +121,8 @@ if command -v pyenv 1>/dev/null 2>&1; then eval "$(pyenv init --path)" fi export PYENV_ROOT="$HOME/.pyenv" +export XDG_DATA_DIRS="/usr/local/share:/usr/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" +alias ghostty="ghostty 2>/dev/null" + +. "$HOME/.local/bin/env" +. "$HOME/.cargo/env" diff --git a/dot_config/ghostty/config b/dot_config/ghostty/config new file mode 100644 index 0000000..cd182b3 --- /dev/null +++ b/dot_config/ghostty/config @@ -0,0 +1,74 @@ +# This is the configuration file for Ghostty. +# +# This template file has been automatically created at the following +# path since Ghostty couldn't find any existing config files on your system: +# +# /home/riz/.config/ghostty/config +# +# The template does not set any default options, since Ghostty ships +# with sensible defaults for all options. Users should only need to set +# options that they want to change from the default. +# +# Run `ghostty +show-config --default --docs` to view a list of +# all available config options and their default values. +# +# Additionally, each config option is also explained in detail +# on Ghostty's website, at https://ghostty.org/docs/config. +# +# Ghostty can reload the configuration while running by using the menu +# options or the bound key (default: Command + Shift + comma on macOS and +# Control + Shift + comma on other platforms). Not all config options can be +# reloaded while running; some only apply to new windows and others may require +# a full restart to take effect. + +# Config syntax crash course +# ========================== +# # The config file consists of simple key-value pairs, +# # separated by equals signs. +# font-family = Iosevka +# window-padding-x = 2 +# +# # Spacing around the equals sign does not matter. +# # All of these are identical: +# key=value +# key= value +# key =value +# key = value +# +# # Any line beginning with a # is a comment. It's not possible to put +# # a comment after a config option, since it would be interpreted as a +# # part of the value. For example, this will have a value of "#123abc": +# background = #123abc +# +# # Empty values are used to reset config keys to default. +# key = +# +# # Some config options have unique syntaxes for their value, +# # which is explained in the docs for that config option. +# # Just for example: +# resize-overlay-duration = 4s 200ms +font-family = CaskaydiaCove Nerd Font +font-size = 10 +theme = Atom + +# --- Aesthetics --- +gtk-adwaita = true +window-decoration = client +window-step-resize = true +gtk-titlebar = true +background-opacity = 0.9 +background-blur = 20 +window-padding-x = 10 +window-padding-y = 10 + +# --- Cursor --- +cursor-style = block +cursor-style-blink = true + +# --- Integration & Usability --- +copy-on-select = true +confirm-close-surface = false +mouse-hide-while-typing = true + + + diff --git a/dot_config/lazydocker/empty_config.yml b/dot_config/lazydocker/empty_config.yml new file mode 100644 index 0000000..e69de29 diff --git a/dot_config/lazygit/empty_config.yml b/dot_config/lazygit/empty_config.yml new file mode 100644 index 0000000..e69de29 diff --git a/dot_config/starship_linux.toml b/dot_config/starship_linux.toml new file mode 100644 index 0000000..2039c69 --- /dev/null +++ b/dot_config/starship_linux.toml @@ -0,0 +1,31 @@ +scan_timeout = 1500 + +format = """ +$os$shell$hostname$username$directory$git_branch$git_status$status +$character""" + +[os] +disabled = false +format = "[$symbol](bold $STARSHIP_DEVICE_COLOR) " + +[os.symbols] +Windows = "󰍲 " +Ubuntu = " " + +[shell] +disabled = false +powershell_indicator = "pwsh" +bash_indicator = "bash" +zsh_indicator = "zsh" +style = "cyan bold" + +[status] +disabled = false +format = "[$symbol]($style) " +symbol = " " + +[character] +success_symbol = "[>](bold green)" +error_symbol = "[>](bold red)" + + diff --git a/dot_config/symlink_nvim b/dot_config/symlink_nvim new file mode 100644 index 0000000..9d9bbdb --- /dev/null +++ b/dot_config/symlink_nvim @@ -0,0 +1 @@ +/mnt/c/Users/reazul.ashraf/AppData/Local/nvim diff --git a/dot_curlrc b/dot_curlrc new file mode 100644 index 0000000..e86bf3f --- /dev/null +++ b/dot_curlrc @@ -0,0 +1 @@ +insecure diff --git a/dot_profile b/dot_profile new file mode 100644 index 0000000..b3f1b00 --- /dev/null +++ b/dot_profile @@ -0,0 +1,31 @@ +# ~/.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 +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/.local/bin" ] ; then + PATH="$HOME/.local/bin:$PATH" +fi + + +. "$HOME/.local/bin/env" +. "$HOME/.cargo/env" diff --git a/dot_tmux.conf b/dot_tmux.conf new file mode 100644 index 0000000..2786ac8 --- /dev/null +++ b/dot_tmux.conf @@ -0,0 +1,49 @@ +set-option -g prefix C-b +set -g mouse on + +# General settings +set -g base-index 1 # start windows at 1 +setw -g pane-base-index 1 # start panes at 1 +set -g renumber-windows on # renumber windows when one is closed +setw -g mode-keys vi # use vim keys in copy mode +set-option -g status-position top + +# Key bindings +bind r source-file ~/.tmux.conf \; display "Config Reloaded!" + +bind-key "|" split-window -h -c "#{pane_current_path}" +bind-key C-| split-window -h -c "#{pane_current_path}" +bind-key "\\" split-window -v -c "#{pane_current_path}" +bind-key C-\\ split-window -v -c "#{pane_current_path}" + +bind-key "-" split-window -fv -c "#{pane_current_path}" +bind-key C-- split-window -fv -c "#{pane_current_path}" + +bind -r "<" swap-window -d -t -1 +bind -r ">" swap-window -d -t +1 + +bind c new-window -c "#{pane_current_path}" + +bind Space last-window +bind-key C-Space switch-client -l + +# Pane navigation +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R + +# Pane resizing +bind -r C-j resize-pane -D 15 +bind -r C-k resize-pane -U 15 +bind -r C-h resize-pane -L 15 +bind -r C-l resize-pane -R 15 + +# Plugins +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' +set -g @plugin 'tmux-plugins/tmux-yank' +set -g @plugin 'erikw/tmux-powerline' + +# Initialize TMUX plugin manager +run '~/.tmux/plugins/tpm/tpm' diff --git a/dot_wgetrc b/dot_wgetrc new file mode 100644 index 0000000..3170574 --- /dev/null +++ b/dot_wgetrc @@ -0,0 +1,2 @@ +check-certificate=off + diff --git a/dot_zprofile b/dot_zprofile new file mode 100644 index 0000000..87e4dc2 --- /dev/null +++ b/dot_zprofile @@ -0,0 +1 @@ +export XDG_DATA_DIRS="/home/riz/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/home/hyperion/.local/share/flatpak/exports/share:$XDG_DATA_DIRS" diff --git a/dot_zshenv b/dot_zshenv new file mode 100644 index 0000000..c2f3182 --- /dev/null +++ b/dot_zshenv @@ -0,0 +1 @@ +. "$HOME/.cargo/env" diff --git a/dot_zshrc b/dot_zshrc index 8909835..5bc3524 100644 --- a/dot_zshrc +++ b/dot_zshrc @@ -1,71 +1,149 @@ -if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then - source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" -fi +cd ~ + +# if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then +# source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" +# fi + +# --- Homebrew Initialization (Primary) --- +eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" VI_MODE_SET_CURSOR=true MODE_INDICATOR="%F{yellow}+%f" bindkey -v bindkey 'jk' vi-cmd-mode + +# Visual feedback for vi mode +function zle-keymap-select { + if [[ $KEYMAP == vicmd ]]; then + echo -ne "\e[2 q" # Block + else + echo -ne "\e[6 q" # Beam + fi +} +zle -N zle-keymap-select +echo -ne "\e[6 q" # Start with beam +precmd() { echo -ne "\e[6 q" } # Reset to beam before prompt bindkey '^[[A' history-substring-search-up bindkey '^[[B' history-substring-search-down -# export manpath="/usr/local/man:$manpath" export LC_CTYPE=en_GB.UTF-8 export LC_ALL=en_GB.UTF-8 export LANG=en_GB.UTF-8 export EDITOR='/usr/bin/nvim' +export MAVEN_OPTS='-Dstyle.color=always' -# to customize prompt, run `p10k configure` or edit ~/.p10k.zsh. -[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh +# Options +setopt AUTO_CD +setopt CORRECT +setopt HIST_IGNORE_DUPS +setopt SHARE_HISTORY + +# History +HISTSIZE=10000 +SAVEHIST=10000 +HISTFILE=~/.zsh_history + +# # to customize prompt, run `p10k configure` or edit ~/.p10k.zsh. +# [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh export PYENV_ROOT="$HOME/.pyenv" export JDK8_HOME="$HOME/.jdks/jdk-1.8" +export JDK8_32_HOME="$HOME/.jdks/jdk-1.8-i586" export JDK21_HOME="$HOME/.jdks/jdk-21" -export JAVA_HOME="$JDK21_HOME" +export JDK25_HOME="$HOME/.jdks/jdk-25" +export JAVA_HOME="$JDK25_HOME" export GROOVY_HOME="$HOME/devtools/groovy" export M2_HOME="$HOME/devtools/maven" export NODE_ENV=development +export GDK_BACKEND=x11 -export PATH="$JAVA_HOME/bin:$M2_HOME/bin:$GROOVY_HOME/bin:$PYENV_ROOT/bin:$HOME/.npm-global/bin:/snap/bin:$HOME/.local/bin:/usr/local/bin:/usr/bin:/mnt/c/windows/system32" +# PATH Configuration (Homebrew and Local Bin prioritized) +export PATH="$HOME/.local/bin:$PATH:$JAVA_HOME/bin:$M2_HOME/bin:$GROOVY_HOME/bin:$PYENV_ROOT/bin:$HOME/.npm-global/bin:/snap/bin" -typeset -g POWERLEVEL9K_INSTANT_PROMPT=off +typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet export ZSH="/home/riz/.oh-my-zsh" -ZSH_THEME="powerlevel10k/powerlevel10k" +# ZSH_THEME="powerlevel10k/powerlevel10k" -plugins=(git vi-mode zsh-autosuggestions zsh-syntax-highlighting zsh-history-substring-search) -#source /usr/share/doc/fzf/examples/key-bindings.zsh +plugins=( + git + vi-mode + zsh-autosuggestions + zsh-history-substring-search + zsh-completions + fzf-tab + zsh-syntax-highlighting +) -export LIBGL_ALWAYS_INDIRECT=1 -#export NNN_PLUG='f:finder;o:fzopen;p:mocplay;d:diffs;t:nmount;v:imgview' -export NNN_ARCHIVE="\\.(7z|a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|rar|rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)$" +# fzf-tab settings +zstyle ':fzf-tab:complete:cd:*' fzf-preview 'eza -1 --color=always $realpath' +zstyle ':fzf-tab:complete:*' fzf-flags --color=fg:1,fg+:2 --height=50% +zstyle ':completion:*:descriptions' format '[%d]' +zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} -export DENO_INSTALL="/home/riz/.deno" -export PATH="$DENO_INSTALL/bin:$PATH" +source <(fzf --zsh) +export FZF_DEFAULT_OPTS="--height 40% --layout=reverse --border --preview 'bat --style=numbers --color=always --line-range :500 {}'" +export FZF_CTRL_T_OPTS="--preview 'bat --style=numbers --color=always --line-range :500 {}'" +export FZF_ALT_C_OPTS="--preview 'eza --tree --icons --color=always {} | head -200'" -source $ZSH/oh-my-zsh.sh - -alias fcd='cd $(find * -type d | fzf)' +# General Aliases +alias ai='gemini' alias vi=nvim -alias jdk8home="export JAVA_HOME=$JDK8_HOME" -alias jdk21home="export JAVA_HOME=$JDK21_HOME" alias g=git -alias cat=batcat -alias bat=batcat -alias code="/mnt/c/Program\ Files/Microsoft\ VS\ Code/bin/code" +alias lg=lazygit +alias code="/mnt/c/Users/reazul.ashraf/AppData/Local/Programs/Microsoft\ VS\ Code/bin/code" alias pbcopy='xclip -selection clipboard' alias pbpaste='xclip -selection clipboard -o' +# --- Gold Standard Tool Mapping (Deduplicated & High Performance) --- +# Homebrew provides these; aliases ensure they are used consistently. +alias ls='eza --icons --group-directories-first' +alias la='eza --icons -la --group-directories-first --git' +alias tree='eza --tree --icons' +alias cat='bat' +alias find='fd' +alias ff='fd' +alias grep='rg' +alias sed='sd' +alias awk='choose' +alias ps='procs' +alias top='btm' +alias curl='xh' +alias zip='ouch' +alias tar='ouch' +alias diff='delta' +alias tldr='tealdeer' +# -------------------------------------------------------------------- + +# Navigation +alias ..='cd ..' +alias ...='cd ../..' +alias ....='cd ../../..' +alias .....='cd ../../../..' + +# Functions +fcd() { + local dir + dir=$(fd -t d 2>/dev/null | fzf --preview 'eza --tree --icons --color=always {} | head -200') && cd "$dir" +} + +alias jdk8home="export JAVA_HOME=$JDK8_HOME" +alias jdk8home32="export JAVA_HOME=$JDK8_32_HOME" +alias jdk21home="export JAVA_HOME=$JDK21_HOME" +alias jdk25home="export JAVA_HOME=$JDK25_HOME" + +java() { + $JAVA_HOME/bin/java $@ +} gsquash() { git reset --soft head~$(git rev-list --count head ^$1) echo "To complete then do, git push --force" } +# Development Helpers dmvn() { ws="/mnt/c/users/reazul.ashraf/workspace/uichannel-commission-bootstrap" - echo "ws: $ws" - id="$(docker run -t -d -u root:root -v /home/riz/.m2:/volume/.m2 -w $ws -v $ws:$ws:rw,z -v $ws@tmp:$ws@tmp:rw,z maven:3-openjdk-8-slim cat)" - echo "id: $id" + id="$(docker run -t -d -u root:root -v /home/riz/.m2:/volume/.m2 -w $ws -v $ws:$ws:rw,z -v $ws@tmp:$ws@tmp:rw,z maven:3-openjdk-8-slim cat)" docker exec -ti $id ls -alp $ws docker kill $id } @@ -74,14 +152,37 @@ sonarscan() { MAVEN_OPTS="-Dsonar.branch.name=$(git branch --show-current)" JAVA_HOME=$JDK21_HOME mvn org.sonarsource.scanner.maven:sonar-maven-plugin:RELEASE:sonar -DskipTests } -source /snap/google-cloud-cli/current/completion.zsh.inc - -#if command -v pyenv >/dev/null 2>&1; then -# eval "$(pyenv init -)" -#fi - +# Environment Initializations eval "$(zoxide init --cmd z zsh)" -# Start in ~ -cd ~ +# pnpm +export PNPM_HOME="/home/riz/.local/share/pnpm" +case ":$PATH:" in + *":$PNPM_HOME:"*) ;; + *) export PATH="$PNPM_HOME:$PATH" ;; +esac +export GOOGLE_CLOUD_PROJECT=inse-r-and-d +export XDG_DATA_DIRS="/usr/local/share:/usr/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" +alias ghostty="ghostty 2>/dev/null" +alias gimp='GDK_BACKEND=x11 gimp' +export PYTHONWARNINGS="ignore:Your system is avx2 capable:RuntimeWarning" + +# Cargo / Local Bin +[ -f "$HOME/.local/bin/env" ] && . "$HOME/.local/bin/env" +[ -f "$HOME/.cargo/env" ] && . "$HOME/.cargo/env" + +# Autosuggestions color (make it readable) +export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=cyan' + +source $ZSH/oh-my-zsh.sh + + +export STARSHIP_DEVICE_COLOR="orange" +export STARSHIP_CONFIG=~/.config/starship_linux.toml +eval "$(starship init zsh)" + + +alias refresh-vpn='powershell.exe -ExecutionPolicy Bypass -File "C:\Users\reazul.ashraf\scripts\refresh_wsl_vpn.ps1"' + +export GEMINI_CLI_HOME="/mnt/c/Users/reazul.ashraf" diff --git a/symlink_dot_ssh b/symlink_dot_ssh new file mode 100644 index 0000000..1158219 --- /dev/null +++ b/symlink_dot_ssh @@ -0,0 +1 @@ +/mnt/c/Users/reazul.ashraf/.ssh