dev: automated commit - 2025-06-09 09:35:58

This commit is contained in:
Mariano Z. 2025-06-09 09:35:58 -03:00
parent 6f13d4b40d
commit c71e2bd9a9
5 changed files with 92 additions and 22 deletions

View file

@ -58,8 +58,11 @@ alias doomconf="vim ~/.config/gzdoom/gzdoom.ini"
alias pluginconf="vim ~/.config/nvim/plugins.vim"
alias i3conf="vim ~/.config/i3/config"
alias cssh="vim ~/.ssh/config"
alias vd='vim -c ":VimwikiMakeDiaryNote"'
alias vw='vim -c ":VimwikiIndex"'
function vimwhich {
nvim $(which $1)
}
alias vw="vimwhich"
# Clipboard operations - with auto-detection
if [ "$XDG_SESSION_TYPE" = "wayland" ]; then

View file

@ -287,6 +287,7 @@ fi
# COMPLETIONS
for completion_file in ~/.local/share/zsh/*-autocomplete.zsh; do
echo $completion_file
if [ -f "$completion_file" ]; then
source "$completion_file"
fi
@ -298,14 +299,7 @@ if command -v kubefwd &> /dev/null; then eval "$(kubefwd completion zsh)"; fi
if command -v bombadil &> /dev/null; then eval "$(bombadil generate-completions zsh)"; fi
if command -v eza &> /dev/null; then compdef eza=ls; fi
# ALIASES
# yarn() { echo 🖕; }
# yarnpkg() { echo 🖕; }
# pnpm() { echo 🖕; }
# pn() { echo 🖕; }
# pnpx() { echo 🖕; }
# npm() { echo 🖕; }
alias dev='~/Dev/marianozunino/dev/dev'
alias p='_package_manager'
alias fo='fopen'
alias drop='upload_file'

View file

@ -23,19 +23,30 @@ if [ -z "$TMUX" ]; then
fi
fi
# tmux project launcher function
function tmuxLauncher {
selected_dir=$(/bin/fd --base-directory ~/Dev --search-path . -t d -d 2 | fzf)
if [[ -n "$selected_dir" ]]; then
if git rev-parse --git-dir &>/dev/null; then
tmux rename-window "$selected_dir"
cd "$HOME/Dev/$selected_dir"
else
tmux new-window -n "$selected_dir" -c "$HOME/Dev/$selected_dir"
fi
local selected_dir full_path session_name
selected_dir=$(fd --base-directory ~/Dev --search-path . -t d -d 2 | fzf)
[[ -z "$selected_dir" ]] && { zle reset-prompt; return }
selected_dir="${selected_dir#./}"
selected_dir="${selected_dir%/}"
full_path="$HOME/Dev/$selected_dir"
session_name="${selected_dir//\//-}"
session_name="${session_name%-}"
if [[ -n "$TMUX" ]]; then
tmux new-window -n "$session_name" -c "$full_path"
zle reset-prompt
else
echo "tmux new-session -s '$session_name' -c '$full_path'" > /tmp/tmux_cmd
zle accept-line
BUFFER="source /tmp/tmux_cmd && rm /tmp/tmux_cmd"
zle accept-line
fi
zle reset-prompt
}
zle -N tmuxLauncher
bindkey "^t" tmuxLauncher