From 36da3064212a99150eee45744c2f1d8d2ddd2695 Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Mon, 24 Jan 2022 11:54:38 +0200 Subject: [PATCH] Added some minor twekas to workspace scripts + new git tmux shortcut. -g will let you add files to stage. --- files/dotfiles/gitconfig | 1 + .../shellconfig/workspaces/add_workspace.sh | 10 ++++------ .../shellconfig/workspaces/delete_workspace.sh | 13 ++++++------- files/dotfiles/tmux.conf | 3 +++ 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/files/dotfiles/gitconfig b/files/dotfiles/gitconfig index 917074e..861fdb5 100644 --- a/files/dotfiles/gitconfig +++ b/files/dotfiles/gitconfig @@ -30,6 +30,7 @@ ada = add . cm = commit -m ck = checkout + fza = "!git ls-files -m -o --exclude-standard | fzf -m --print0 --reverse --header \"🞥 Select files to stage. use [tab] for multi selection\" --preview \"bat --diff --color=always --style=numbers,changes,grid {}\" | xargs -0 -t -o git add" [diff] tool = vimdiff diff --git a/files/dotfiles/shellconfig/workspaces/add_workspace.sh b/files/dotfiles/shellconfig/workspaces/add_workspace.sh index e6d937b..335f5a0 100755 --- a/files/dotfiles/shellconfig/workspaces/add_workspace.sh +++ b/files/dotfiles/shellconfig/workspaces/add_workspace.sh @@ -5,13 +5,11 @@ JSON_PATH=~/.shellconfig/workspaces/workspaces.json function yes_no_question() { QUESTION=$1 RESPONSE=$(cat <-b bind-key b send-keys "gitB" C-m +# Git add + fzf +bind-key g run-shell "tmux neww -n '🞥 📑 Git Add' 'cd #{pane_current_path} && (git ls-files -m -o --exclude-standard | fzf -m --print0 --reverse --header \"🞥 Select files to stage. use [tab] for multi selection\" --preview \"bat --diff --color=always --style=numbers,changes,grid {}\" | xargs -0 -o -t git add)'" + ############################ # Themes ###########################