feat(tmux): update tmux config and scripts
This commit is contained in:
@@ -5,12 +5,14 @@ source "$XDG_CONFIG_HOME/zsh/scripts.zsh"
|
||||
if [[ $# -eq 1 ]]; then
|
||||
selected=$1
|
||||
else
|
||||
read -p "ssh url: " selected
|
||||
read -p "url: " selected
|
||||
fi
|
||||
|
||||
if [[ -z $selected ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
ggman clone "$selected"
|
||||
ggcompile
|
||||
ggman clone $selected
|
||||
|
||||
echo ""
|
||||
read -p "press enter to continue..."
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
if [[ $# -eq 1 ]]; then
|
||||
selected=$1
|
||||
else
|
||||
selected=$(ggman exec pwd 2>&1 >/dev/null \
|
||||
selected=$(ggman ls \
|
||||
| fzf --cycle \
|
||||
--bind 'tab:toggle-up,btab:toggle-down' \
|
||||
--header "Navigate with ARROW KEYS or TAB/S-TAB. Select with ENTER." \
|
||||
@@ -18,12 +18,8 @@ if [[ -z $selected ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
path=$selected
|
||||
while [[ "$path" != "" && ! -e "$path/.sessionizer" ]]; do
|
||||
path=${path%/*}
|
||||
done
|
||||
selected_name="$(echo $selected | shasum -a 256 | head -c 4)_$(basename $selected | tr . _ | head -c 10)"
|
||||
|
||||
selected_name="$(cat $path/.sessionizer)_$(basename $selected | tr . _ | head -c 10)_$(echo $selected | shasum -a 256 | head -c 4)"
|
||||
tmux_running=$(pgrep tmux)
|
||||
|
||||
if [[ -z $TMUX ]] && [[ -z $tmux_running ]]; then
|
||||
|
||||
@@ -44,7 +44,7 @@ function main() {
|
||||
if [[ $# -eq 1 ]]; then
|
||||
selected=$1
|
||||
else
|
||||
selected="$(rg -N --no-heading 'Host .*' ~/.ssh \
|
||||
selected="$(rg -N --no-heading '^Host .*' ~/.ssh \
|
||||
| sed 's/Host \(.*\)/\1/' \
|
||||
| SHELL=$(which bash) fzf --cycle \
|
||||
--bind 'tab:toggle-up,btab:toggle-down' \
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
set -g default-terminal "xterm-256color"
|
||||
set -ag terminal-overrides ",xterm-256color:RGB"
|
||||
set -ga terminal-overrides ",xterm-256color:RGB"
|
||||
set -ga terminal-features ",xterm-256color:clipboard"
|
||||
|
||||
set -g allow-passthrough on
|
||||
set -g set-clipboard on
|
||||
|
||||
set -s escape-time 0
|
||||
|
||||
set-option -g focus-events on
|
||||
|
||||
unbind C-b
|
||||
set-option -g prefix C-s
|
||||
|
||||
bind r source-file "$XDG_CONFIG_HOME/tmux/tmux.conf"
|
||||
set -g base-index 1
|
||||
|
||||
set -g status-style 'bg=#45403d fg=#d4be98'
|
||||
set -g status-style 'bg=default fg=default'
|
||||
set -g status-left-length 20
|
||||
|
||||
set-window-option -g mode-keys vi
|
||||
|
||||
Reference in New Issue
Block a user