Back to zsh and tmux
This commit is contained in:
parent
e11b80703e
commit
0ad3918fd6
|
@ -2,7 +2,7 @@
|
|||
live_config_reload = true
|
||||
|
||||
import = [
|
||||
"~/.config/alacritty/themes/Homebrew.toml"
|
||||
"~/.config/alacritty/themes/tokyo_night_enhanced.toml"
|
||||
]
|
||||
|
||||
[cursor.style]
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
# Colors (Tokyo Night)
|
||||
# Source https//github.com/zatchheems/tokyo-night-alacritty-theme
|
||||
|
||||
# Default colors
|
||||
[colors.primary]
|
||||
background = '#1a1b26'
|
||||
foreground = '#a9b1d6'
|
||||
|
||||
# Normal colors
|
||||
[colors.normal]
|
||||
black = '#32344a'
|
||||
red = '#f7768e'
|
||||
green = '#9ece6a'
|
||||
yellow = '#e0af68'
|
||||
blue = '#7aa2f7'
|
||||
magenta = '#ad8ee6'
|
||||
cyan = '#449dab'
|
||||
white = '#787c99'
|
||||
|
||||
# Bright colors
|
||||
[colors.bright]
|
||||
black = '#444b6a'
|
||||
red = '#ff7a93'
|
||||
green = '#b9f27c'
|
||||
yellow = '#ff9e64'
|
||||
blue = '#7da6ff'
|
||||
magenta = '#bb9af7'
|
||||
cyan = '#0db9d7'
|
||||
white = '#acb0d0'
|
|
@ -0,0 +1,30 @@
|
|||
[colors.primary]
|
||||
background = "#08080b"
|
||||
foreground = "#787c99"
|
||||
|
||||
[colors.cursor]
|
||||
cursor = "#787c99"
|
||||
|
||||
[colors.selection]
|
||||
text = "CellForeground"
|
||||
background = "#515c7e"
|
||||
|
||||
[colors.normal]
|
||||
black = "#363b54"
|
||||
red = "#f7768e"
|
||||
green = "#41a6b5"
|
||||
yellow = "#e0af68"
|
||||
blue = "#7aa2f7"
|
||||
magenta = "#bb9af7"
|
||||
cyan = "#7dcfff"
|
||||
white = "#787c99"
|
||||
|
||||
[colors.bright]
|
||||
black = "#363b54"
|
||||
red = "#f7768e"
|
||||
green = "#41a6b5"
|
||||
yellow = "#e0af68"
|
||||
blue = "#7aa2f7"
|
||||
magenta = "#bb9af7"
|
||||
cyan = "#7dcfff"
|
||||
white = "#787c99"
|
|
@ -0,0 +1,29 @@
|
|||
# Colors (Tokyo Night Storm variant)
|
||||
# Source https//github.com/zatchheems/tokyo-night-alacritty-theme
|
||||
|
||||
# Default colors
|
||||
[colors.primary]
|
||||
background = '#24283b'
|
||||
foreground = '#a9b1d6'
|
||||
|
||||
# Normal colors
|
||||
[colors.normal]
|
||||
black = '#32344a'
|
||||
red = '#f7768e'
|
||||
green = '#9ece6a'
|
||||
yellow = '#e0af68'
|
||||
blue = '#7aa2f7'
|
||||
magenta = '#ad8ee6'
|
||||
cyan = '#449dab'
|
||||
white = '#9699a8'
|
||||
|
||||
# Bright colors
|
||||
[colors.bright]
|
||||
black = '#444b6a'
|
||||
red = '#ff7a93'
|
||||
green = '#b9f27c'
|
||||
yellow = '#ff9e64'
|
||||
blue = '#7da6ff'
|
||||
magenta = '#bb9af7'
|
||||
cyan = '#0db9d7'
|
||||
white = '#acb0d0'
|
|
@ -0,0 +1,28 @@
|
|||
# XTerm's default colors
|
||||
|
||||
# Default colors
|
||||
[colors.primary]
|
||||
background = '#000000'
|
||||
foreground = '#ffffff'
|
||||
|
||||
# Normal colors
|
||||
[colors.normal]
|
||||
black = '#000000'
|
||||
red = '#cd0000'
|
||||
green = '#00cd00'
|
||||
yellow = '#cdcd00'
|
||||
blue = '#0000ee'
|
||||
magenta = '#cd00cd'
|
||||
cyan = '#00cdcd'
|
||||
white = '#e5e5e5'
|
||||
|
||||
# Bright colors
|
||||
[colors.bright]
|
||||
black = '#7f7f7f'
|
||||
red = '#ff0000'
|
||||
green = '#00ff00'
|
||||
yellow = '#ffff00'
|
||||
blue = '#5c5cff'
|
||||
magenta = '#ff00ff'
|
||||
cyan = '#00ffff'
|
||||
white = '#ffffff'
|
|
@ -0,0 +1,18 @@
|
|||
return {
|
||||
"christoomey/vim-tmux-navigator",
|
||||
cmd = {
|
||||
"TmuxNavigateLeft",
|
||||
"TmuxNavigateDown",
|
||||
"TmuxNavigateUp",
|
||||
"TmuxNavigateRight",
|
||||
"TmuxNavigatePrevious",
|
||||
"TmuxNavigatorProcessList",
|
||||
},
|
||||
keys = {
|
||||
{ "<c-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" },
|
||||
{ "<c-j>", "<cmd><C-U>TmuxNavigateDown<cr>" },
|
||||
{ "<c-k>", "<cmd><C-U>TmuxNavigateUp<cr>" },
|
||||
{ "<c-l>", "<cmd><C-U>TmuxNavigateRight<cr>" },
|
||||
{ "<c-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" },
|
||||
},
|
||||
}
|
|
@ -6,7 +6,7 @@
|
|||
#pinentry-program /usr/local/bin/pinentry-curses
|
||||
#pinentry-program /usr/local/bin/pinentry-mac
|
||||
#pinentry-program /opt/homebrew/bin/pinentry-mac
|
||||
pinentry-program /usr/bin/pinentry-curses
|
||||
pinentry-program /opt/homebrew/bin/pinentry-mac
|
||||
enable-ssh-support
|
||||
ttyname $GPG_TTY
|
||||
default-cache-ttl 60
|
||||
|
|
|
@ -9,5 +9,5 @@
|
|||
\.gnupg/reader_0.status
|
||||
\.ssh/known_hosts*
|
||||
\.ssh/authorized_keys
|
||||
LICENCE
|
||||
README.md
|
||||
LICENSE
|
||||
|
|
|
@ -0,0 +1,232 @@
|
|||
# Setup zinit home and startup
|
||||
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
|
||||
[ ! -d $ZINIT_HOME ] && mkdir -p "$(dirname $ZINIT_HOME)"
|
||||
[ ! -d $ZINIT_HOME/.git ] && git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
|
||||
|
||||
# source zinit
|
||||
source "${ZINIT_HOME}/zinit.zsh"
|
||||
|
||||
# Add in zsh plugins
|
||||
zinit light zsh-users/zsh-syntax-highlighting
|
||||
zinit light zsh-users/zsh-completions
|
||||
zinit light zsh-users/zsh-autosuggestions
|
||||
#zinit light Aloxaf/fzf-tab
|
||||
zinit light junegunn/fzf-git.sh
|
||||
|
||||
# Load completions
|
||||
autoload -U compinit && compinit
|
||||
|
||||
# My configurations
|
||||
# Colors
|
||||
autoload -U colors && colors
|
||||
|
||||
# Prompt
|
||||
PROMPT="%(!.%F{red}%n.%F{green}%n)%{$reset_color%}@%F{magenta}%m %F{blue}%(5~|%-2~/…/%2~|%4~) %(?.%F{green}.%F{red})%(?..[%?] )%{$reset_color%}%(!.%F{red}%#.%F{green}%#)%{$reset_color%} "
|
||||
|
||||
# keybindings
|
||||
bindkey -v
|
||||
bindkey "^p" history-search-backward
|
||||
bindkey "^n" history-search-forward
|
||||
bindkey -r "^G^B" fzf-git-branches-widget
|
||||
bindkey -r "^G^E" fzf-git-each_ref-widget
|
||||
bindkey -r "^G^F" fzf-git-files-widget
|
||||
bindkey -r "^G^H" fzf-git-hashes-widget
|
||||
bindkey -r "^G^L" fzf-git-lreflogs-widget
|
||||
bindkey -r "^G^R" fzf-git-remotes-widget
|
||||
bindkey -r "^G^S" fzf-git-stashes-widget
|
||||
bindkey -r "^G^T" fzf-git-tags-widget
|
||||
bindkey -r "^G^W" fzf-git-worktrees-widget
|
||||
bindkey -r "^Gb" fzf-git-branches-widget
|
||||
bindkey -r "^Ge" fzf-git-each_ref-widget
|
||||
bindkey -r "^Gf" fzf-git-files-widget
|
||||
bindkey -r "^Gh" fzf-git-hashes-widget
|
||||
bindkey -r "^Gl" fzf-git-lreflogs-widget
|
||||
bindkey -r "^Gr" fzf-git-remotes-widget
|
||||
bindkey -r "^Gs" fzf-git-stashes-widget
|
||||
bindkey -r "^Gt" fzf-git-tags-widget
|
||||
bindkey "^[w" fzf-git-worktrees-widget
|
||||
bindkey "^[b" fzf-git-branches-widget
|
||||
bindkey "^[e" fzf-git-each_ref-widget
|
||||
bindkey "^[f" fzf-git-files-widget
|
||||
bindkey "^[h" fzf-git-hashes-widget
|
||||
bindkey "^[l" fzf-git-lreflogs-widget
|
||||
bindkey "^[r" fzf-git-remotes-widget
|
||||
bindkey "^[s" fzf-git-stashes-widget
|
||||
bindkey "^[t" fzf-git-tags-widget
|
||||
bindkey "^[w" fzf-git-worktrees-widget
|
||||
|
||||
|
||||
# History
|
||||
HISTSIZE=5000
|
||||
HISTFILE=~/.zsh_history
|
||||
SAVEHIST=$HISTSIZE
|
||||
HISTDUP=erase
|
||||
setopt appendhistory
|
||||
setopt sharehistory
|
||||
setopt hist_ignore_space
|
||||
setopt hist_ignore_all_dups
|
||||
setopt hist_save_no_dups
|
||||
setopt hist_ignore_dups
|
||||
setopt hist_find_no_dups
|
||||
|
||||
# Copmletion styling
|
||||
zstyle ":completion:*" matcher-list "m:{a-z}={A-Za-z}"
|
||||
zstyle ":completion:*" list-colors "${(s.:.)LS_COLORS}"
|
||||
## disable sort when completing `git checkout`
|
||||
#zstyle ":completion:*:git-checkout:*" sort false
|
||||
## set descriptions format to enable group support
|
||||
## NOTE: don"t use escape sequences (like "%F{red}%d%f") here, fzf-tab will ignore them
|
||||
#zstyle ":completion:*:descriptions" format "[%d]"
|
||||
## set list-colors to enable filename colorizing
|
||||
#zstyle ":completion:*" list-colors ${(s.:.)LS_COLORS}
|
||||
## force zsh not to show completion menu, which allows fzf-tab to capture the unambiguous prefix
|
||||
#zstyle ":completion:*" menu no
|
||||
## preview directory"s content with eza when completing cd
|
||||
#zstyle ":fzf-tab:complete:cd:*" fzf-preview "eza -1 --color=always $realpath"
|
||||
## custom fzf flags
|
||||
## NOTE: fzf-tab does not follow FZF_DEFAULT_OPTS by default
|
||||
#zstyle ":fzf-tab:*" fzf-flags --color=fg:1,fg+:2 --bind=tab:accept
|
||||
## To make fzf-tab follow FZF_DEFAULT_OPTS.
|
||||
## NOTE: This may lead to unexpected behavior since some flags break this plugin. See Aloxaf/fzf-tab#455.
|
||||
#zstyle ":fzf-tab:*" use-fzf-default-opts yes
|
||||
## switch group using `<` and `>`
|
||||
#zstyle ":fzf-tab:*" switch-group "<" ">"
|
||||
#zstyle ':fzf-tab:*' fzf-command ftb-tmux-popup
|
||||
|
||||
# Start tmux
|
||||
ID=$(id -u)
|
||||
if [[ "$TMUX" = "" && $ID != 0 ]]; then
|
||||
/opt/homebrew/bin/tmux
|
||||
fi
|
||||
|
||||
# PATH
|
||||
# Homebrew
|
||||
export PATH="/opt/homebrew/bin:$PATH"
|
||||
export PATH="/opt/homebrew/sbin:$PATH"
|
||||
|
||||
# Local PATH
|
||||
export PATH=$PATH:$HOME/.local/bin
|
||||
|
||||
# Mason PATH
|
||||
export PATH=$PATH:$HOME/.local/share/nvim/mason/bin
|
||||
|
||||
# Java
|
||||
export PATH="$PATH:/opt/homebrew/Cellar/openjdk/23.0.1/bin"
|
||||
|
||||
# Ruby
|
||||
#export PATH=$PATH:/opt/homebrew/opt/ruby/bin
|
||||
#export PATH=$PATH:/opt/homebrew/lib/ruby/gems/3.4.0/bin
|
||||
|
||||
# Zig
|
||||
export PATH=$PATH:/opt/zig
|
||||
|
||||
# pyenv
|
||||
export PYENV_ROOT="$HOME/.pyenv"
|
||||
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
eval "$(pyenv init - zsh)"
|
||||
eval "$(pyenv virtualenv-init -)"
|
||||
|
||||
|
||||
# VARIABLES
|
||||
if [ $ID != 0 ]; then
|
||||
# ssh and gpg
|
||||
export GPG_TTY=$(tty)
|
||||
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||
gpgconf --launch gpg-agent
|
||||
gpg-connect-agent updatestartuptty /bye > /dev/null
|
||||
fi
|
||||
|
||||
# bat
|
||||
export BAT_THEME='tokyonight_night'
|
||||
|
||||
# Editor
|
||||
export EDITOR='nvim'
|
||||
|
||||
# Manpager
|
||||
#export PAGER='nvim +Man!'
|
||||
|
||||
# fzf
|
||||
export FZF_CTRL_T_OPTS="--preview 'bat -n --color=always --line-range :500 {}'"
|
||||
export FZF_ALT_C_OPTS="--preview 'eza --tree --color=always {} | head 200'"
|
||||
|
||||
# Term for ssh
|
||||
#export TERM="xterm-256color"
|
||||
|
||||
# Homebrew
|
||||
export HOMEBREW_NO_AUTO_UPDATE=1
|
||||
export HOMEBREW_NO_ENV_HINTS=1
|
||||
|
||||
# DBUS for zathura
|
||||
#export DBUS_LAUNCHD_SESSION_BUS_SOCKET=/tmp/(id -u)
|
||||
#export DBUS_SESSION_BUS_ADDRESS='unix:path='$DBUS_LAUNCHD_SESSION_BUS_SOCKET
|
||||
#if pgrep -x dbus-daemon &> /dev/null
|
||||
# printf (_ "%sdbus-daemon%s is running\n") (set_color red) (set_color normal)
|
||||
#else
|
||||
# #echo "dbus-daemon is not running"
|
||||
# dbus-daemon --fork --session --address=$DBUS_SESSION_BUS_ADDRESS
|
||||
#end
|
||||
|
||||
# fzf
|
||||
export FZF_DEFAULT_COMMAND="fd --hidden --strip-cwd-prefix --exclude .git"
|
||||
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
||||
export FZF_DEFAULT_COMMAND="fd --type=d --hidden --strip-cwd-prefix --exclude .git"
|
||||
export FZF_CTRL_T_OPTS="--preview 'bat -n --color=always --line-range :500 {}'"
|
||||
export FZF_ALT_C_OPTS="--preview 'eza --tree --color=always {} | head -200'"
|
||||
|
||||
_fzf_compgen_path() {
|
||||
fd --hidden --exclude .git . "$1"
|
||||
}
|
||||
|
||||
_fzf_compgen_dir() {
|
||||
fd --type=d --hidden --exclude .git . "$1"
|
||||
}
|
||||
|
||||
_fzf_comprun() {
|
||||
local command=$1
|
||||
shift
|
||||
case "$command" in
|
||||
cd) fzf --preview "eza --tree --color=always {} | head -200" "$@" ;;
|
||||
export|unset) fzf --preview "eval 'echo \$' {}" "$@" ;;
|
||||
ssh) fzf --preview "dig {}" "$@" ;;
|
||||
*) fzf --preview "bat -n --color=always --line-range :500 {}" "$@" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
# ALIAS
|
||||
# convinience
|
||||
alias doas="sudo"
|
||||
|
||||
# Neovim
|
||||
alias vi="nvim"
|
||||
alias vim="nvim"
|
||||
|
||||
# cat
|
||||
alias cat="bat"
|
||||
|
||||
# ls
|
||||
alias ls="eza --color=always --long --git --icons=always --group"
|
||||
|
||||
# cd
|
||||
alias cd="z"
|
||||
|
||||
# mutt
|
||||
#alias mutt='neomutt'
|
||||
|
||||
# rsync
|
||||
alias rsync="rsync -h -v -r -P -p -t --stats"
|
||||
|
||||
# wget folder
|
||||
alias wget_f="wget -r -np -R 'index.html*'"
|
||||
|
||||
# btop
|
||||
alias top="btop"
|
||||
|
||||
# Shell integrations
|
||||
# The fuck
|
||||
eval $(thefuck --alias)
|
||||
|
||||
#zoxide
|
||||
eval "$(zoxide init zsh)"
|
||||
|
||||
# fzf
|
||||
eval "$(fzf --zsh)"
|
Loading…
Reference in New Issue