mirror of
https://github.com/avinal/dotfiles.git
synced 2026-07-03 23:20:07 +05:30
feat: add more configurations and a new theme
- a theme based on carbon and vim high contrast - modify layouts in zellij and add support for swaps - add snippets Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
This commit is contained in:
@@ -13,7 +13,18 @@ export EDITOR='hx'
|
||||
export OC_EDITOR="hx"
|
||||
export SSH_AUTH_SOCK="/run/user/$(id -u)/keyring/ssh"
|
||||
export MANPATH="/usr/local/man:$MANPATH"
|
||||
export FZF_DEFAULT_OPTS='--height 25% --layout=reverse --border'
|
||||
# fzf: use fd for file/dir finding, bat for previews, theme-matched colors
|
||||
export FZF_DEFAULT_COMMAND='fd --type f --hidden --follow --exclude .git'
|
||||
export FZF_DEFAULT_OPTS=" \
|
||||
--height=40% --layout=reverse --border=rounded --cycle --scroll-off=4 \
|
||||
--color=bg+:#393939,fg+:#ffffff,hl:#3a97d4,hl+:#3a97d4 \
|
||||
--color=info:#1ea672,prompt:#1ea672,pointer:#ed5f74,marker:#c96ed0 \
|
||||
--color=spinner:#d97917,header:#3a97d4,border:#393939 \
|
||||
--bind='ctrl-d:half-page-down,ctrl-u:half-page-up'"
|
||||
export FZF_CTRL_T_COMMAND='fd --type f --hidden --follow --exclude .git'
|
||||
export FZF_CTRL_T_OPTS="--preview 'bat --style=numbers --color=always --line-range :200 {}' --preview-window=right:50%:wrap"
|
||||
export FZF_ALT_C_COMMAND='fd --type d --hidden --follow --exclude .git'
|
||||
export FZF_ALT_C_OPTS="--preview 'ls --color=always {}'"
|
||||
|
||||
# Claude Code
|
||||
export CLAUDE_CODE_USE_VERTEX=1
|
||||
@@ -64,6 +75,10 @@ zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
|
||||
zstyle ':completion:*' menu no
|
||||
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls --color $realpath'
|
||||
zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-preview 'ls --color $realpath'
|
||||
zstyle ':fzf-tab:complete:(hx|cat|bat|less|head|tail):*' fzf-preview \
|
||||
'bat --style=numbers --color=always --line-range :100 $realpath 2>/dev/null || ls --color $realpath'
|
||||
zstyle ':fzf-tab:complete:ls:*' fzf-preview 'ls --color $realpath'
|
||||
zstyle ':fzf-tab:*' switch-group '<' '>'
|
||||
|
||||
# === Tool Initialization ===
|
||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||
@@ -75,6 +90,7 @@ export NVM_DIR="$HOME/.nvm"
|
||||
# Atuin env (adds ~/.atuin/bin to PATH)
|
||||
[ -f "$HOME/.atuin/bin/env" ] && . "$HOME/.atuin/bin/env"
|
||||
|
||||
eval "$(fzf --zsh)"
|
||||
eval "$(zoxide init zsh)"
|
||||
unalias zi 2>/dev/null; alias zi='__zoxide_zi'
|
||||
eval "$(atuin init zsh)"
|
||||
@@ -86,8 +102,26 @@ export ZSH_AUTOSUGGEST_STRATEGY=(atuin history completion)
|
||||
bindkey '^[[1;5C' forward-word
|
||||
|
||||
# === Functions ===
|
||||
znew() {
|
||||
zellij action new-tab --layout "$1" --name "$2" --cwd "$3"
|
||||
|
||||
znew() { zellij action new-tab --layout "$1" --name "$2" --cwd "$3"; }
|
||||
|
||||
zwork() {
|
||||
local layout_dir="${XDG_CONFIG_HOME:-$HOME/.config}/zellij/layouts"
|
||||
|
||||
local project
|
||||
project=$(fd --type d --max-depth 2 . 2>/dev/null \
|
||||
| fzf --prompt="Folder > " --preview='ls --color=always {}')
|
||||
[ -z "$project" ] && return 0
|
||||
|
||||
local layout
|
||||
layout=$(fd --type f --extension kdl . "$layout_dir" 2>/dev/null \
|
||||
| sed 's|.*/||; s/\.kdl$//' \
|
||||
| fzf --prompt="Layout > ")
|
||||
[ -z "$layout" ] && return 0
|
||||
|
||||
local tab_name
|
||||
echo -n "Tab name [${project%/}]: "; read tab_name
|
||||
zellij action new-tab --layout "$layout" --name "${tab_name:-${project%/}}" --cwd "$PWD/$project"
|
||||
}
|
||||
|
||||
# === Aliases ===
|
||||
|
||||
Reference in New Issue
Block a user