* starship - simplified report format line and placed on the left top before prompt
* # character prompt by default * tmux styled and smart tab naming + vim toml plugin
This commit is contained in:
9
.bashrc
9
.bashrc
@ -73,3 +73,12 @@ function right_prompt(){
|
|||||||
starship_precmd_user_func="right_prompt"
|
starship_precmd_user_func="right_prompt"
|
||||||
|
|
||||||
eval "$(starship init bash)"
|
eval "$(starship init bash)"
|
||||||
|
|
||||||
|
# Prepare LC_ALL for correct fonts rendering in tmux
|
||||||
|
export LC_ALL=en_US.UTF-8
|
||||||
|
export LANG=ru_RU.UTF-8
|
||||||
|
|
||||||
|
# auto into tmux session
|
||||||
|
if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then
|
||||||
|
sudo tmux attach || sudo tmux
|
||||||
|
fi
|
||||||
|
@ -1,22 +1,18 @@
|
|||||||
format = """
|
format = """
|
||||||
$jobs\
|
|
||||||
$username\
|
|
||||||
$character\
|
|
||||||
"""
|
|
||||||
|
|
||||||
right_format = """
|
|
||||||
$fill\
|
|
||||||
$cmd_duration\
|
$cmd_duration\
|
||||||
$git_branch\
|
$git_branch\
|
||||||
$git_status\
|
$git_status\
|
||||||
$hostname\
|
$username\
|
||||||
:\
|
@\
|
||||||
$directory\
|
$directory\
|
||||||
$fill\
|
$line_break\
|
||||||
|
$character\
|
||||||
"""
|
"""
|
||||||
|
|
||||||
add_newline = false
|
add_newline = false
|
||||||
|
|
||||||
|
[line_break]
|
||||||
|
disabled = false
|
||||||
|
|
||||||
[jobs]
|
[jobs]
|
||||||
format = "[\\[$number\\]]($style) "
|
format = "[\\[$number\\]]($style) "
|
||||||
@ -25,12 +21,12 @@ number_threshold = 1
|
|||||||
symbol_threshold = 2
|
symbol_threshold = 2
|
||||||
|
|
||||||
[character]
|
[character]
|
||||||
success_symbol = "[%](blue)"
|
success_symbol = '[#](blue)'
|
||||||
error_symbol = "[%](red)"
|
error_symbol = '[#](red)'
|
||||||
vicmd_symbol = "[%](blue)"
|
vicmd_symbol = '[#](blue)'
|
||||||
|
|
||||||
[cmd_duration]
|
[cmd_duration]
|
||||||
format = "[$duration]($style) "
|
format = "\\[[$duration]($style)\\] "
|
||||||
style = "150"
|
style = "150"
|
||||||
|
|
||||||
[fill]
|
[fill]
|
||||||
@ -42,7 +38,7 @@ format = "[$branch]($style)"
|
|||||||
style = "242"
|
style = "242"
|
||||||
|
|
||||||
[git_status]
|
[git_status]
|
||||||
format = " [$modified]($style)"
|
format = " [$modified]($style) "
|
||||||
style = "242"
|
style = "242"
|
||||||
conflicted = ""
|
conflicted = ""
|
||||||
untracked = ""
|
untracked = ""
|
||||||
@ -52,6 +48,11 @@ renamed = ""
|
|||||||
deleted = ""
|
deleted = ""
|
||||||
stashed = ""
|
stashed = ""
|
||||||
|
|
||||||
|
[hostname]
|
||||||
|
format = "[$hostname]($style)"
|
||||||
|
ssh_only = false
|
||||||
|
style = "150"
|
||||||
|
|
||||||
[username]
|
[username]
|
||||||
style_user = 'white bold'
|
style_user = 'white bold'
|
||||||
style_root = 'black bold'
|
style_root = 'black bold'
|
||||||
@ -59,11 +60,6 @@ format = '[$user]($style) '
|
|||||||
disabled = false
|
disabled = false
|
||||||
show_always = true
|
show_always = true
|
||||||
|
|
||||||
[hostname]
|
|
||||||
format = "[$hostname]($style)"
|
|
||||||
ssh_only = false
|
|
||||||
style = "150"
|
|
||||||
|
|
||||||
[directory]
|
[directory]
|
||||||
style = "blue"
|
style = "blue"
|
||||||
truncate_to_repo = false
|
truncate_to_repo = false
|
||||||
|
@ -78,6 +78,7 @@ install_vim_plugins() {
|
|||||||
|
|
||||||
git clone https://github.com/tpope/vim-sensible.git
|
git clone https://github.com/tpope/vim-sensible.git
|
||||||
git clone https://github.com/altercation/vim-colors-solarized.git
|
git clone https://github.com/altercation/vim-colors-solarized.git
|
||||||
|
git clone https://github.com/cespare/vim-toml.git
|
||||||
}
|
}
|
||||||
|
|
||||||
#install_nix
|
#install_nix
|
||||||
|
86
.tmux.conf
86
.tmux.conf
@ -8,19 +8,26 @@ set-window-option -g xterm-keys on
|
|||||||
# For this to work you need to install https://github.com/tmux-plugins/tpm
|
# For this to work you need to install https://github.com/tmux-plugins/tpm
|
||||||
set -g @plugin 'tmux-plugins/tpm'
|
set -g @plugin 'tmux-plugins/tpm'
|
||||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||||
# Those two allow continuous saving and restoring of tmux sessions
|
|
||||||
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||||
set -g @plugin 'tmux-plugins/tmux-continuum'
|
set -g @plugin 'tmux-plugins/tmux-continuum'
|
||||||
# Intuitive bindings for splitting panes
|
|
||||||
set -g @plugin 'tmux-plugins/tmux-pain-control'
|
set -g @plugin 'tmux-plugins/tmux-pain-control'
|
||||||
# Integrations with system clipboard
|
|
||||||
set -g @plugin 'tmux-plugins/tmux-yank'
|
set -g @plugin 'tmux-plugins/tmux-yank'
|
||||||
# Easier session management
|
|
||||||
set -g @plugin 'tmux-plugins/tmux-sessionist'
|
set -g @plugin 'tmux-plugins/tmux-sessionist'
|
||||||
# Man in a split
|
|
||||||
set -g @plugin 'knakayama/tmux-man'
|
set -g @plugin 'knakayama/tmux-man'
|
||||||
# Peek-a-boo
|
|
||||||
set -g @plugin 'knakayama/tmux-newline-detector'
|
set -g @plugin 'knakayama/tmux-newline-detector'
|
||||||
|
set -g @plugin 'anghootys/tmux-ip-address'
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
|
||||||
|
|
||||||
|
# List of disabled plugins on some reasons
|
||||||
|
#set -g @plugin 'thewtex/tmux-mem-cpu-load'
|
||||||
|
#set -g @plugin 'b0o/tmux-autoreload'
|
||||||
|
#set -g @plugin 'ofirgall/tmux-window-name'
|
||||||
|
#set -g @plugin 'tmux-plugins/tmux-sidebar'
|
||||||
|
#set -g @treemux-tree-nvim-init-file '~/.tmux/plugins/treemux/configs/treemux_init.lua'
|
||||||
|
#set -g @plugin 'kiyoon/treemux'
|
||||||
|
#set -g @plugin 'leighmcculloch/tmux-colours-superhero'
|
||||||
|
#run-shell "powerline-daemon -q"
|
||||||
|
#source "/usr/share/powerline/bindings/tmux/powerline.conf"
|
||||||
|
|
||||||
## Plugin configuration
|
## Plugin configuration
|
||||||
set -g @continuum-restore 'on'
|
set -g @continuum-restore 'on'
|
||||||
@ -30,21 +37,77 @@ set -g @yank_selection 'primary'
|
|||||||
set -g @man-size '40%'
|
set -g @man-size '40%'
|
||||||
set -g @man-orientation 'h'
|
set -g @man-orientation 'h'
|
||||||
set -g @man-shell-interactive 'off'
|
set -g @man-shell-interactive 'off'
|
||||||
|
#set-option -g @tmux-autoreload-entrypoints '~/.tmux.conf'
|
||||||
|
#set -g @tmux-autoreload-quiet 1
|
||||||
|
#set -g @sidebar-tree-position 'right'
|
||||||
|
|
||||||
# True colors (via: https://jdhao.github.io/2018/10/19/tmux_nvim_true_color/ )
|
# True colors (via: https://jdhao.github.io/2018/10/19/tmux_nvim_true_color/ )
|
||||||
set -g default-terminal "screen-256color"
|
set -g default-terminal "screen-256color"
|
||||||
# tell Tmux that outside terminal supports true color
|
# tell Tmux that outside terminal supports true color
|
||||||
set -ag terminal-overrides ",alacritty:RGB"
|
set -ag terminal-overrides ",alacritty:RGB"
|
||||||
|
|
||||||
|
# --- START colours superhero ---
|
||||||
|
|
||||||
|
# not suppoerted option
|
||||||
|
#setw -g utf8 on
|
||||||
|
|
||||||
|
# Update Interval
|
||||||
|
set -g status-interval 1
|
||||||
|
|
||||||
|
# Status bar
|
||||||
|
# not suppoerted option
|
||||||
|
#set -g status-utf8 on
|
||||||
|
set -g status-bg default
|
||||||
|
set -g status-fg white
|
||||||
|
|
||||||
|
# Status bar - left side
|
||||||
|
set -g status-left ''
|
||||||
|
|
||||||
|
# Status bar - right side
|
||||||
|
set -g status-right-length 100
|
||||||
|
set -g status-right-fg black
|
||||||
|
set -g status-right-attr bold
|
||||||
|
set -g status-right '#{prefix_highlight} #{?window_zoomed_flag,#[fg=colour178]ZOOMED #[fg=colour238]• ,}#[fg=colour178]#h #[fg=colour238]• #[fg=colour178]#{ip_address} #[fg=colour238]• #[fg=colour178]%a %b %d #[fg=colour178]%I:%M%P '
|
||||||
|
|
||||||
|
# Window status - not the current window
|
||||||
|
set-window-option -g window-status-bg default
|
||||||
|
set-window-option -g window-status-fg white
|
||||||
|
set-window-option -g window-status-attr none
|
||||||
|
set-window-option -g window-status-format '#[fg=colour214,bg=colour235] #I #[fg=white,bg=colour236] #(pwd="#{pane_current_path}"; echo ${pwd####*/}) #W #[default]'
|
||||||
|
|
||||||
|
# Window status - current window
|
||||||
|
set-window-option -g window-status-current-attr none
|
||||||
|
set-window-option -g window-status-current-format '#[fg=black,bg=colour214] #I #[fg=brightwhite,bg=colour238] #(pwd="#{pane_current_path}"; echo ${pwd####*/}) #W #[default]'
|
||||||
|
|
||||||
|
# Pane borders
|
||||||
|
set -g pane-border-bg default
|
||||||
|
set -g pane-border-fg colour235
|
||||||
|
set -g pane-active-border-bg default
|
||||||
|
set -g pane-active-border-fg colour214
|
||||||
|
|
||||||
|
# Pane number display
|
||||||
|
set-option -g display-panes-active-colour colour214
|
||||||
|
set-option -g display-panes-colour colour240
|
||||||
|
|
||||||
|
# --- END colours superhero ---
|
||||||
|
|
||||||
## Windows style
|
## Windows style
|
||||||
set-option -g status-style fg=yellow,bg=default
|
#set-option -g status-style fg=yellow,bg=default
|
||||||
set-window-option -g pane-active-border-style ''
|
#set-window-option -g pane-active-border-style ''
|
||||||
|
|
||||||
## A bit more space in right status bar
|
## A bit more space in right status bar
|
||||||
set -g status-right-length 50
|
#set -g status-right-length 50
|
||||||
|
|
||||||
|
## Windows status style
|
||||||
|
#set -g status-style "bg=#4c566a,fg=#eceff4"
|
||||||
|
#set -g status-left "#[fg=#bf616a,bg=#ebcb8b,bold] #S "
|
||||||
|
#set -g status-right "#{prefix_highlight} #[bg=#a3be8c,fg=black,bold] #U #[bg=#ebcb8b,fg=#bf616a,bold] #h "
|
||||||
|
#setw -g window-status-format "#[fg=#81a1c1,bg=#4c566a] #I:#W "
|
||||||
|
#setw -g window-status-current-format "#[fg=#2e3440,bg=#81a1c1,bold] #I:#W "
|
||||||
|
#setw -g window-status-separator ""
|
||||||
|
|
||||||
## Rename windows to fit current application
|
## Rename windows to fit current application
|
||||||
setw -g automatic-rename on
|
#setw -g automatic-rename on
|
||||||
|
|
||||||
# Use zsh regardless of default settings
|
# Use zsh regardless of default settings
|
||||||
if-shell 'test -x /usr/bin/zsh' 'set-option -g default-shell /usr/bin/zsh'
|
if-shell 'test -x /usr/bin/zsh' 'set-option -g default-shell /usr/bin/zsh'
|
||||||
@ -69,6 +132,9 @@ bind-key -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M"
|
|||||||
bind-key -T copy-mode-vi WheelUpPane send-keys -X halfpage-up
|
bind-key -T copy-mode-vi WheelUpPane send-keys -X halfpage-up
|
||||||
bind-key -T copy-mode-vi WheelDownPane send-keys -X halfpage-down
|
bind-key -T copy-mode-vi WheelDownPane send-keys -X halfpage-down
|
||||||
|
|
||||||
|
# Tmux config reload
|
||||||
|
bind r source-file ~/.tmux.conf
|
||||||
|
|
||||||
# Toggle prefix on/off with F12 (for nested remote sessions)
|
# Toggle prefix on/off with F12 (for nested remote sessions)
|
||||||
bind -T root F12 \
|
bind -T root F12 \
|
||||||
set prefix None \;\
|
set prefix None \;\
|
||||||
|
Reference in New Issue
Block a user