tmux scripts style
This commit is contained in:
parent
ed8739aa70
commit
d3731cb198
@ -189,7 +189,24 @@ bind -T copy-mode-vi WheelUpPane select-pane \; send-keys -X -N 2 scroll-up
|
||||
bind -T copy-mode-vi WheelDownPane select-pane \; send-keys -X -N 2 scroll-down
|
||||
|
||||
|
||||
FZF_DEFAULT_OPTS="\
|
||||
--cycle
|
||||
--color='preview-border:grey,separator:grey'
|
||||
--pointer=''
|
||||
--marker='+'
|
||||
--border=rounded
|
||||
--border-label-pos=bottom
|
||||
--preview-window=70%
|
||||
--no-multi
|
||||
--bind
|
||||
ctrl-/:toggle-preview,\
|
||||
ctrl-p:preview-up,\
|
||||
ctrl-n:preview-down,\
|
||||
ctrl-o:toggle,\
|
||||
ctrl-u:clear-query
|
||||
"
|
||||
|
||||
# Session managment
|
||||
bind a display-popup -EE -w 80% -h 80% -T 'Attach session' '~/.local/bin/tmux_attach_session.sh'
|
||||
bind s display-popup -EE -w 80% -h 80% -T 'Start session' '~/.local/bin/tmux_start_session.sh'
|
||||
bind k display-popup -EE -w 80% -h 80% -T 'Kill sessions' '~/.local/bin/tmux_kill_sessions.sh'
|
||||
bind a display-popup -EE -w 80% -h 80% -B '~/.local/bin/tmux_attach_session.sh'
|
||||
bind s display-popup -EE -w 80% -h 80% -B '~/.local/bin/tmux_start_session.sh'
|
||||
bind k display-popup -EE -w 80% -h 80% -B '~/.local/bin/tmux_kill_sessions.sh'
|
||||
@ -4,17 +4,12 @@
|
||||
readonly tmux_list_sessions_script="$HOME/.local/bin/tmux_list_sessions.sh"
|
||||
|
||||
export FZF_DEFAULT_OPTS="\
|
||||
--cycle \
|
||||
--pointer='' \
|
||||
--color='pointer:blue,prompt:blue,preview-border:blue' \
|
||||
--no-multi \
|
||||
--preview-window 70%,follow \
|
||||
--preview 'tmux capture-pane -p -e -t {1}'
|
||||
--bind \
|
||||
ctrl-/:toggle-preview,\
|
||||
ctrl-p:preview-up,\
|
||||
ctrl-n:preview-down,\
|
||||
ctrl-u:clear-query,\
|
||||
${FZF_DEFAULT_OPTS}
|
||||
--color='border:blue,label:blue'
|
||||
--border-label=' Attach session '
|
||||
--preview-window=follow
|
||||
--preview='tmux capture-pane -p -e -t {1}'
|
||||
--bind
|
||||
ctrl-x:execute\(tmux\ kill-session\ -t\ {1}\)+reload\(${tmux_list_sessions_script}\),\
|
||||
load:reload\(${tmux_list_sessions_script}\;sleep\ 1\)\
|
||||
"
|
||||
|
||||
@ -4,20 +4,13 @@
|
||||
readonly tmux_list_sessions_script="$HOME/.local/bin/tmux_list_sessions.sh"
|
||||
|
||||
export FZF_DEFAULT_OPTS="\
|
||||
--cycle \
|
||||
--pointer='' \
|
||||
--marker='+' \
|
||||
--color='pointer:red,prompt:red,preview-border:red' \
|
||||
--multi \
|
||||
--preview-window 70%,follow \
|
||||
--preview 'tmux capture-pane -p -e -t {1}' \
|
||||
--bind \
|
||||
ctrl-/:toggle-preview,\
|
||||
ctrl-a:toggle-all,\
|
||||
ctrl-p:preview-up,\
|
||||
ctrl-n:preview-down,\
|
||||
ctrl-u:clear-query,\
|
||||
ctrl-o:toggle,\
|
||||
${FZF_DEFAULT_OPTS}
|
||||
--color='border:red,label:red'
|
||||
--border-label=' Kill sessions '
|
||||
--multi
|
||||
--preview-window=follow
|
||||
--preview='tmux capture-pane -p -e -t {1}'
|
||||
--bind
|
||||
ctrl-x:execute\(tmux\ kill-session\ -t\ {1}\)+reload\(${tmux_list_sessions_script}\)\
|
||||
"
|
||||
|
||||
|
||||
@ -2,14 +2,10 @@
|
||||
|
||||
|
||||
export FZF_DEFAULT_OPTS="\
|
||||
--cycle \
|
||||
--pointer='' \
|
||||
--color='pointer:green,prompt:green,preview-border:green' \
|
||||
--bind \
|
||||
ctrl-/:toggle-preview,\
|
||||
ctrl-p:preview-up,\
|
||||
ctrl-n:preview-down,\
|
||||
ctrl-u:clear-query\
|
||||
${FZF_DEFAULT_OPTS}
|
||||
--color='border:green,label:green'
|
||||
--border-label=' Start session '
|
||||
--no-multi \
|
||||
"
|
||||
|
||||
readonly TMUX_SESSIONS="${HOME}/.tmux"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user