Updated scripts
This commit is contained in:
parent
156be53fdc
commit
d5ea34a805
@ -4,12 +4,6 @@ case $- in
|
|||||||
*) return ;;
|
*) return ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# if [[ ! $TERM =~ linux ]]; then
|
|
||||||
# if [[ $TERM =~ tmux ]]; then
|
|
||||||
# source ~/.local/share/blesh/ble.sh --noattach
|
|
||||||
# fi
|
|
||||||
# fi
|
|
||||||
|
|
||||||
# don't put duplicate lines or lines starting with space in the history.
|
# don't put duplicate lines or lines starting with space in the history.
|
||||||
# See bash(1) for more options
|
# See bash(1) for more options
|
||||||
HISTCONTROL=ignoreboth
|
HISTCONTROL=ignoreboth
|
||||||
@ -25,6 +19,13 @@ HISTFILESIZE=2000
|
|||||||
# update the values of LINES and COLUMNS.
|
# update the values of LINES and COLUMNS.
|
||||||
shopt -s checkwinsize
|
shopt -s checkwinsize
|
||||||
|
|
||||||
|
# Set autocomplete
|
||||||
|
bind 'set show-all-if-ambiguous on'
|
||||||
|
bind 'TAB:menu-complete'
|
||||||
|
|
||||||
|
# Set auto cd
|
||||||
|
shopt -s autocd
|
||||||
|
|
||||||
# make less more friendly for non-text input files, see lesspipe(1)
|
# make less more friendly for non-text input files, see lesspipe(1)
|
||||||
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||||
|
|
||||||
@ -51,17 +52,16 @@ alias lsa="eza -1 -l --icons=auto --git-repos --git -h -g -o --no-permissions -a
|
|||||||
alias lss="eza -1 -l --icons=auto --git-repos --git -h -g --total-size -o --no-permissions -a"
|
alias lss="eza -1 -l --icons=auto --git-repos --git -h -g --total-size -o --no-permissions -a"
|
||||||
|
|
||||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||||
|
source ~/.fzf.bash
|
||||||
|
eval "$(starship init bash)"
|
||||||
|
|
||||||
if [[ $TERM =~ tmux ]]; then
|
if [[ $TERM =~ tmux ]]; then
|
||||||
source ~/.fzf.bash
|
|
||||||
eval "$(zoxide init bash)"
|
eval "$(zoxide init bash)"
|
||||||
eval "$(starship init bash)"
|
|
||||||
# [[ ! ${BLE_VERSION-} ]] || ble-attach
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# TMUX
|
# # TMUX
|
||||||
if [[ ! $TERM =~ tmux ]]; then
|
# if [[ ! $TERM =~ tmux ]]; then
|
||||||
if which tmux >/dev/null 2>&1; then
|
# if which tmux >/dev/null 2>&1; then
|
||||||
tmux new-session
|
# tmux new-session
|
||||||
fi
|
# fi
|
||||||
fi
|
# fi
|
||||||
|
|||||||
11
start_toolbox.sh
Executable file
11
start_toolbox.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Name of the tmux session
|
||||||
|
SESSION_NAME="toolbox"
|
||||||
|
|
||||||
|
# Check if the tmux session already exists
|
||||||
|
if tmux has-session -t "$SESSION_NAME" 2>/dev/null; then
|
||||||
|
tmux attach-session -t "$SESSION_NAME"
|
||||||
|
else
|
||||||
|
tmux new-session -s "$SESSION_NAME" "devspectoolbox"
|
||||||
|
fi
|
||||||
57
tmux.conf
57
tmux.conf
@ -10,44 +10,12 @@ if "test ! -d ~/.tmux/plugins/tpm" \
|
|||||||
# Activate the plugins.
|
# Activate the plugins.
|
||||||
run "~/.tmux/plugins/tpm/tpm"
|
run "~/.tmux/plugins/tpm/tpm"
|
||||||
|
|
||||||
|
# Options
|
||||||
set -g mouse on
|
set -g mouse on
|
||||||
|
|
||||||
# Start windows and panes at 1, not 0
|
|
||||||
set -g base-index 1
|
set -g base-index 1
|
||||||
set -g pane-base-index 1
|
set -g pane-base-index 1
|
||||||
set-window-option -g pane-base-index 1
|
set-window-option -g pane-base-index 1
|
||||||
set-option -g renumber-windows on
|
set-option -g renumber-windows on
|
||||||
|
|
||||||
set -g @smart-splits_no_wrap '' # to disable wrapping. (any value disables wrapping)
|
|
||||||
|
|
||||||
set -g @smart-splits_move_left_key 'C-h' # key-mapping for navigation.
|
|
||||||
set -g @smart-splits_move_down_key 'C-j' # --"--
|
|
||||||
set -g @smart-splits_move_up_key 'C-k' # --"--
|
|
||||||
set -g @smart-splits_move_right_key 'C-l' # --"--
|
|
||||||
|
|
||||||
set -g @smart-splits_resize_left_key 'M-h' # key-mapping for resizing.
|
|
||||||
set -g @smart-splits_resize_down_key 'M-j' # --"--
|
|
||||||
set -g @smart-splits_resize_up_key 'M-k' # --"--
|
|
||||||
set -g @smart-splits_resize_right_key 'M-l' # --"--
|
|
||||||
|
|
||||||
set -g @smart-splits_resize_step_size '3' # change the step-size for resizing.
|
|
||||||
|
|
||||||
bind -n C-M-h if -F "#{@pane-is-vim}" 'split-window -h -b -c "#{pane_current_path}" "nvim"' 'split-window -h -b'
|
|
||||||
bind -n C-M-l if -F "#{@pane-is-vim}" 'split-window -h -c "#{pane_current_path}" "nvim"' 'split-window -h'
|
|
||||||
bind -n C-M-j split-window -v -p 10 -c "#{pane_current_path}"
|
|
||||||
bind -n C-M-k split-window -v -b -c "#{pane_current_path}"
|
|
||||||
|
|
||||||
bind -n M-1 select-window -t 1
|
|
||||||
bind -n M-2 select-window -t 2
|
|
||||||
bind -n M-3 select-window -t 3
|
|
||||||
bind -n M-4 select-window -t 4
|
|
||||||
bind -n M-5 select-window -t 5
|
|
||||||
bind -n M-n select-window -n
|
|
||||||
bind -n M-Enter new-window
|
|
||||||
bind -n M-c kill-pane
|
|
||||||
|
|
||||||
bind -n C-g display-popup -d "#{pane_current_path}" -E -w 90% -h 90% "lazygit"
|
|
||||||
|
|
||||||
set-option -g status-position top
|
set-option -g status-position top
|
||||||
set-option -g default-terminal "tmux-256color"
|
set-option -g default-terminal "tmux-256color"
|
||||||
set-option -sa terminal-features ',xterm-256color:RGB'
|
set-option -sa terminal-features ',xterm-256color:RGB'
|
||||||
@ -55,16 +23,39 @@ set-option -sg escape-time 1
|
|||||||
set-option -g focus-events on
|
set-option -g focus-events on
|
||||||
set-option -g status-right-length 100
|
set-option -g status-right-length 100
|
||||||
set-option -g set-clipboard on
|
set-option -g set-clipboard on
|
||||||
|
set -g @smart-splits_no_wrap '' # to disable wrapping. (any value disables wrapping)
|
||||||
|
set -g @smart-splits_resize_step_size '3' # change the step-size for resizing.
|
||||||
|
|
||||||
|
# Key bindings
|
||||||
|
set -g @smart-splits_move_left_key 'C-h' # key-mapping for navigation.
|
||||||
|
set -g @smart-splits_move_down_key 'C-j' # --"--
|
||||||
|
set -g @smart-splits_move_up_key 'C-k' # --"--
|
||||||
|
set -g @smart-splits_move_right_key 'C-l' # --"--
|
||||||
|
set -g @smart-splits_resize_left_key 'M-h' # key-mapping for resizing.
|
||||||
|
set -g @smart-splits_resize_down_key 'M-j' # --"--
|
||||||
|
set -g @smart-splits_resize_up_key 'M-k' # --"--
|
||||||
|
set -g @smart-splits_resize_right_key 'M-l' # --"--
|
||||||
|
|
||||||
|
bind h if -F "#{@pane-is-vim}" 'split-window -h -b -c "#{pane_current_path}" "source ~/.bashrc && nvim"' 'split-window -h -b'
|
||||||
|
bind l if -F "#{@pane-is-vim}" 'split-window -h -c "#{pane_current_path}" "source ~/.bashrc && nvim"' 'split-window -h'
|
||||||
|
bind j split-window -v -p 10 -c "#{pane_current_path}"
|
||||||
|
bind k split-window -v -b -c "#{pane_current_path}"
|
||||||
|
|
||||||
|
bind -n C-g display-popup -d "#{pane_current_path}" -E -w 90% -h 90% "lazygit"
|
||||||
|
|
||||||
|
# Status bar config
|
||||||
set -g status-interval 2
|
set -g status-interval 2
|
||||||
set -g status-bg "#303030"
|
set -g status-bg "#303030"
|
||||||
set -g status-fg "#c6c6c6"
|
set -g status-fg "#c6c6c6"
|
||||||
set -g status-left '#[bg=#87afd7,fg=#000000] #{session_name} '
|
set -g status-left '#[bg=#87afd7,fg=#000000] #{session_name} '
|
||||||
set -g status-right '#[fg=#87afd7,bg=#303030]#[fg=#c6c6c6,bg=#303030] #{pane_current_path} #[bg=#87afd7,fg=#000000] %d-%b-%Y %H:%M '
|
set -g status-right '#[fg=#87afd7,bg=#303030]#[fg=#c6c6c6,bg=#303030] #{pane_current_path} #[bg=#87afd7,fg=#000000] %d-%b-%Y %H:%M '
|
||||||
set -g status-justify left
|
set -g status-justify left
|
||||||
|
|
||||||
set-window-option -g window-status-separator ''
|
set-window-option -g window-status-separator ''
|
||||||
set-window-option -g window-status-format '#[bg=#303030,fg=#555555] #I '
|
set-window-option -g window-status-format '#[bg=#303030,fg=#555555] #I '
|
||||||
set-window-option -g window-status-current-format '#[bg=#303030,fg=#c6c6c6] #I '
|
set-window-option -g window-status-current-format '#[bg=#303030,fg=#c6c6c6] #I '
|
||||||
|
|
||||||
|
# Window styling
|
||||||
set -g window-style 'bg=default,fg=#c6c6c6'
|
set -g window-style 'bg=default,fg=#c6c6c6'
|
||||||
set -g window-active-style 'bg=default,fg=#c6c6c6'
|
set -g window-active-style 'bg=default,fg=#c6c6c6'
|
||||||
set -g pane-border-style 'bg=#262626,fg=#000000'
|
set -g pane-border-style 'bg=#262626,fg=#000000'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user