Skip to content

Commit

Permalink
more zsh and wezterm
Browse files Browse the repository at this point in the history
  • Loading branch information
mosheavni committed Nov 11, 2024
1 parent 54839e0 commit cea28a2
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 30 deletions.
7 changes: 7 additions & 0 deletions .wezterm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ config.keys = {
-- kill pane
{ key = 'w', mods = 'CMD', action = act.CloseCurrentPane { confirm = true } },

-- end and home keys
{ key = 'ArrowRight', mods = 'CMD', action = act.SendString '\x05' },
{ key = 'ArrowLeft', mods = 'CMD', action = act.SendString '\x01' },

-- Open the configuration file with Cmd+,
{
key = ',',
Expand Down Expand Up @@ -118,6 +122,9 @@ for _, direction in ipairs { 'Left', 'Right', 'Up', 'Down' } do
-- rotate panes
local rotate = direction == 'Left' and 'CounterClockwise' or 'Clockwise'
table.insert(config.keys, { key = direction .. 'Arrow', mods = 'CTRL|SHIFT', action = act.RotatePanes(rotate) })

-- move tab to the left/right with cmd+shift+left/right
table.insert(config.keys, { key = direction .. 'Arrow', mods = 'CMD|SHIFT', action = act.MoveTabRelative(relative) })
end
end

Expand Down
26 changes: 13 additions & 13 deletions .zsh_plugins.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@ zsh-users/zsh-completions kind:fpath path:src
loiccoyle/zsh-github-copilot
ohmyzsh/ohmyzsh path:plugins/asdf kind:defer
ohmyzsh/ohmyzsh path:plugins/argocd
ohmyzsh/ohmyzsh path:plugins/aws
ohmyzsh/ohmyzsh path:plugins/branch
ohmyzsh/ohmyzsh path:plugins/colored-man-pages
ohmyzsh/ohmyzsh path:plugins/command-not-found
# ohmyzsh/ohmyzsh path:plugins/aws # not working
# ohmyzsh/ohmyzsh path:plugins/branch # not needed
# ohmyzsh/ohmyzsh path:plugins/command-not-found # not needed
ohmyzsh/ohmyzsh path:plugins/common-aliases
ohmyzsh/ohmyzsh path:plugins/copybuffer
ohmyzsh/ohmyzsh path:plugins/fzf
# ohmyzsh/ohmyzsh path:plugins/copybuffer # not needed
ohmyzsh/ohmyzsh path:plugins/fzf kind:defer
ohmyzsh/ohmyzsh path:plugins/git
ohmyzsh/ohmyzsh path:plugins/git-auto-fetch
ohmyzsh/ohmyzsh path:plugins/github
ohmyzsh/ohmyzsh path:plugins/golang
ohmyzsh/ohmyzsh path:plugins/kube-ps1
ohmyzsh/ohmyzsh path:plugins/kubectl
ohmyzsh/ohmyzsh path:plugins/kubectx
ohmyzsh/ohmyzsh path:plugins/urltools
ohmyzsh/ohmyzsh path:plugins/gh
ohmyzsh/ohmyzsh path:plugins/golang kind:fpath
macunha1/zsh-terraform kind:fpath
# ohmyzsh/ohmyzsh path:plugins/kube-ps1 kind:defer
ohmyzsh/ohmyzsh path:plugins/kubectl kind:defer
# ohmyzsh/ohmyzsh path:plugins/kubectx # not needed
ohmyzsh/ohmyzsh path:plugins/urltools kind:defer
ohmyzsh/ohmyzsh path:lib/key-bindings.zsh
zsh-users/zsh-autosuggestions kind:defer
zsh-users/zsh-history-substring-search kind:defer
zsh-users/zsh-syntax-highlighting kind:defer

# this is last
belak/zsh-utils path:completion
ohmyzsh/ohmyzsh path:plugins/terraform kind:fpath
ohmyzsh/ohmyzsh path:plugins/docker/completions kind:fpath
39 changes: 22 additions & 17 deletions .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -63,29 +63,36 @@ setopt HIST_BEEP # Beep when accessing nonexistent history.
# ============= #
# Autoloaders #
# ============= #
fpath+=($ZSH_CACHE_DIR/completions)
fpath+=($ZSH_CACHE_DIR/completions /opt/homebrew/share/zsh/site-functions)
source $HOME/.antidote/antidote.zsh
antidote load
export FZF_DEFAULT_COMMAND='ag --hidden --ignore .git -l -g ""'
export FZF_DEFAULT_OPTS='--color fg:242,bg:236,hl:65,fg+:15,bg+:239,hl+:108 --color info:108,prompt:109,spinner:108,pointer:168,marker:168'
export FZF_CTRL_T_COMMAND='rg --color=never --files --hidden --follow -g "!.git"'
export FZF_CTRL_T_OPTS='--preview "bat --color=always --style=numbers,changes {}"'

# ================ #
# PS1 and Random #
# ================ #
# complete -o nospace -C terragrunt -C terraform terragrunt
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
# fzf
export FZF_DEFAULT_COMMAND='ag --hidden --ignore .git -l -g ""'
export FZF_CTRL_T_COMMAND='rg --color=never --files --hidden --follow -g "!.git"'
export FZF_CTRL_T_OPTS='--preview "bat --color=always --style=numbers,changes {}"'

export EDITOR="nvim"
export AWS_PAGER=""

# zsh
export WORDCHARS=""
setopt MENU_COMPLETE
unsetopt AUTO_MENU
unsetopt CASE_GLOB
setopt GLOB_COMPLETE
setopt menu_complete
unsetopt auto_menu
unsetopt case_glob
setopt glob_complete
setopt multios # enable redirect to multiple streams: echo >file1 >file2
setopt long_list_jobs # show long list format job notifications
setopt interactivecomments # recognize comments
zstyle ':completion:*:*:*:*:*' menu select

eval "$(zoxide init --cmd cd zsh)"

# ASDF

# asdf
export ASDF_PYTHON_DEFAULT_PACKAGES_FILE=~/Repos/dotfiles/requirements.txt
[[ -f ~/.asdf/plugins/golang/set-env.zsh ]] && {
source ~/.asdf/plugins/golang/set-env.zsh
Expand All @@ -98,11 +105,6 @@ export ASDF_PYTHON_DEFAULT_PACKAGES_FILE=~/Repos/dotfiles/requirements.txt
bindkey '^[|' zsh_gh_copilot_explain # bind Alt+shift+\ to explain
bindkey '^[\' zsh_gh_copilot_suggest # bind Alt+\ to suggest

# zsh-history-substring-search configuration
bindkey '^[[A' history-substring-search-up # or '\eOA'
bindkey '^[[B' history-substring-search-down # or '\eOB'
HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE=1

# ===================== #
# Aliases and Functions #
# ===================== #
Expand All @@ -127,3 +129,6 @@ if [ -f "$HOME/Downloads/google-cloud-sdk/path.zsh.inc" ]; then . "$HOME/Downloa
if [ -f "$HOME/Downloads/google-cloud-sdk/completion.zsh.inc" ]; then . "$HOME/Downloads/google-cloud-sdk/completion.zsh.inc"; fi

eval "$(starship init zsh)"

autoload -U +X bashcompinit && bashcompinit
complete -o nospace -C /Users/mavni/.asdf/installs/terragrunt/0.64.4/bin/terragrunt terragrunt

0 comments on commit cea28a2

Please sign in to comment.