Tmux-gitbar symbols with Nerd fonts

This commit is contained in:
Shaun Reed 2019-10-10 15:40:35 -04:00
parent 5cfdf2e942
commit c224d84673
2 changed files with 50 additions and 32 deletions

View File

@ -8,25 +8,25 @@
# #
# Location of the status on tmux bar: left or right # Location of the status on tmux bar: left or right
readonly TMGB_STATUS_LOCATION='left' readonly TMGB_STATUS_LOCATION='right'
# Style for tmux-gitbar # Style for tmux-gitbar
readonly TMGB_STYLE='bg=black,fg=white,bright' readonly TMGB_STYLE='bg=colour233,fg=colour255,bright'
# Symbols shown in status string. # Symbols shown in status string.
# Can also be found in tmux-gitbar/lib/tmux-gitbar.sh # Can also be found in tmux-gitbar/lib/tmux-gitbar.sh
NO_REMOTE_TRACKING_SYMBOL="L" NO_REMOTE_TRACKING_SYMBOL="L"
#BRANCH_SYMBOL="⎇ " #BRANCH_SYMBOL="⎇ "
BRANCH_SYMBOL="" BRANCH_SYMBOL="" # Code-branch
STAGED_SYMBOL="●" STAGED_SYMBOL="" # Dot, circle
CONFLICT_SYMBOL="✖" CONFLICT_SYMBOL="" # Close, circle
CHANGED_SYMBOL="✚" CHANGED_SYMBOL="ﱮ" # Plus, circle
UNTRACKED_SYMBOL="…" UNTRACKED_SYMBOL="" # Ellipsis-v
STASHED_SYMBOL="⚑" STASHED_SYMBOL="" # Dolly-flatbed
CLEAN_SYMBOL="✔" CLEAN_SYMBOL="" # Certificate
AHEAD_SYMBOL="↑·" AHEAD_SYMBOL="壟" # File-upload
BEHIND_SYMBOL="↓·" BEHIND_SYMBOL="鹿" # File-download
PREHASH_SYMBOL=":" PREHASH_SYMBOL=":"
# Defaut Tmux format strings for Git bar components. # Defaut Tmux format strings for Git bar components.
@ -60,4 +60,5 @@ TMGB_OUTREPO_STYLE=""
# - #{git_flags} : working tree status flags # - #{git_flags} : working tree status flags
# #
# See README.md for additional information # See README.md for additional information
#readonly TMGB_STATUS_STRING=" #{git_branch} - #{git_upstream} - #{git_remote} #{git_flags}"
readonly TMGB_STATUS_STRING=" #{git_branch} - #{git_upstream} - #{git_remote} #{git_flags}" readonly TMGB_STATUS_STRING=" #{git_branch} - #{git_upstream} - #{git_remote} #{git_flags}"

View File

@ -1,45 +1,59 @@
# Kapper ###############################################################################
## Author: Shaun Reed | Contact: shaunrd0@gmail.com | URL: www.shaunreed.com ##
## ##
## A custom tmux multiplexer config / layout created for Manjaro i3 ##
##+ Inspired by vim-powerline: https://github.com/Lokaltog/powerline ##
## ##
## This config created and tested with Powerline Consolas ##
##+ https://github.com/Lokaltog/powerline-fonts ##
##+ Some symbols may require Font Awesome 5 Free Solid ##
## ##
###############################################################################
# .tmux.conf
#
# If symbols or powerline layout fail to appear...
#+ Check your terminal emulator font settings include these fonts
#+ Check that required fonts are installed
#
# Note: The use of 256colours in this file allows for portable color definitions between platforms and applications
#+ Changing to a different color interpretation may result in some apps displaying colors differently than others
#+ Vim plugin 'Colorizer' does not reflect the actual 256colour values
#+ See https://jonasjacek.github.io/colors/ for a full list of 256colours
set -g mouse on set -g mouse on
set-option -g status-position top set-option -g status-position top
# Can't use theme plugin without risk of repo update overwriting data? # Can't use theme plugin without risk of repo update overwriting data?
#source-file "${HOME}/.tmux-themepack/powerline/double/green.tmuxtheme" #source-file "${HOME}/.tmux-themepack/powerline/double/green.tmuxtheme"
#
# Powerline Double Green - Tmux Theme
# Created by Jim Myhrberg <contact@jimeh.me>.
#
# Inspired by vim-powerline: https://github.com/Lokaltog/powerline
#
# Requires terminal to be using a powerline compatible font, find one here:
# https://github.com/Lokaltog/powerline-fonts
#
# Status update interval # Status update interval
set -g status-interval 1 set -g status-interval 1
# Basic status bar colors # Basic status bar colors
set -g status-style fg=colour240,bg=colour233 set -g status-style fg=colour240,bg=colour233
# Left side of status bar
set -g status-left-style bg=colour233,fg=colour243
set -g status-left-length 40
#set -g status-left "#[fg=colour233,bg=colour100,bold] #S #[fg=colour100,bg=colour240,nobold]#[fg=colour233,bg=colour240] #(whoami) #[fg=colour240,bg=colour235]#[fg=colour240,bg=colour235] #I:#P #[fg=colour235,bg=colour208]#[fg=colour240,bg=colour208] #{git_remote} #{git_flags} #[fg=colour208,bg=colour233,nobold]" #set -g status-left "#[fg=colour233,bg=colour100,bold] #S #[fg=colour100,bg=colour240,nobold]#[fg=colour233,bg=colour240] #(whoami) #[fg=colour240,bg=colour235]#[fg=colour240,bg=colour235] #I:#P #[fg=colour235,bg=colour208]#[fg=colour240,bg=colour208] #{git_remote} #{git_flags} #[fg=colour208,bg=colour233,nobold]"
set -g status-left "#[fg=colour233,bg=colour100,bold] #S #[fg=colour100,bg=colour240,nobold]#[fg=colour233,bg=colour240] #(uname -m)#F #[fg=colour240,bg=colour235]#[fg=colour240,bg=colour235] #I:#P #[fg=colour235,bg=colour233]#[fg=colour240,bg=colour233] #(uname -r)"
# Tmux Git # Tmux Git
#let -g status-left "#[fg=colour233,bg=colour100,bold] #S #[fg=colour100,bg=colour240,nobold]#[fg=colour233,bg=colour240] #(whoami) #[fg=colour240,bg=colour235]#[fg=colour240,bg=colour235] #I:#P #[fg=colour235,bg=colour208]#[fg=colour240,bg=colour208] #{git_remote} #{git_flags} #[fg=colour208,bg=colour233,nobold]" #let -g status-left "#[fg=colour233,bg=colour100,bold] #S #[fg=colour100,bg=colour240,nobold]#[fg=colour233,bg=colour240] #(whoami) #[fg=colour240,bg=colour235]#[fg=colour240,bg=colour235] #I:#P #[fg=colour235,bg=colour208]#[fg=colour240,bg=colour208] #{git_remote} #{git_flags} #[fg=colour208,bg=colour233,nobold]"
# Left side of status bar
set -g status-left-style bg=colour233,fg=colour243
set -g status-left-length 40
# Note: No bold required, no BG reveal produced by symbol gaps on left side
#+ Font: Powerline Consolas
set -g status-left "#[fg=colour233,bg=colour100,bold] #S #[fg=colour100,bg=colour240,nobold]#[fg=colour233,bg=colour240] #(uname -m)#F #[fg=colour240,bg=colour235]#[fg=colour240,bg=colour235] #I:#P #[fg=colour235,bg=colour233]#[fg=colour240,bg=colour233] #(uname -r)"
# Right side of status bar # Right side of status bar
set -g status-right-style bg=colour233,fg=colour243 set -g status-right-style bg=colour233,fg=colour243
set -g status-right-length 150 set -g status-right-length 150
# Hide right bar entirely # Hide right bar entirely
set -g status-right "" #set -g status-right ""
# Default # Note: Powerline font requires alternate of bold on right side
set -g status-right "#[fg=colour235,bg=colour233]#[fg=colour240,bg=colour235] %H:%M:%S #[fg=colour240,bg=colour235]#[fg=colour233,bg=colour240] %d-%b-%y #[fg=colour100,bg=colour240]#[fg=colour233,bg=colour100,bold] #H " # Corrects gap on right of character that reveals BG color
#+ Font: Powerline Consolas
set -g status-right "#[fg=colour235,bg=colour233,bold]#[fg=colour240,bg=colour235, nobold] %H:%M:%S #[fg=colour240,bg=colour235,bold]#[fg=colour233,bg=colour240,nobold] %d-%b-%y #[fg=colour100,bg=colour240,bold]#[fg=colour233,bg=colour100,bold] #H "
# Simple Git # Simple Git
#set -g status-right "#[fg=colour235,bg=colour233] #{simple_git_status} #[fg=colour240,bg=colour235] %H:%M:%S #[fg=colour240,bg=colour235]#[fg=colour233,bg=colour240] %d-%b-%y #[fg=colour100,bg=colour240]#[fg=colour233,bg=colour100,bold] #H " #set -g status-right "#[fg=colour235,bg=colour233] #{simple_git_status} #[fg=colour240,bg=colour235] %H:%M:%S #[fg=colour240,bg=colour235]#[fg=colour233,bg=colour240] %d-%b-%y #[fg=colour100,bg=colour240]#[fg=colour233,bg=colour100,bold] #H "
@ -49,7 +63,7 @@ set -g status-right "#[fg=colour235,bg=colour233]#[fg=colour240,bg=colour235
# Window status # Window status
set -g window-status-format " #I:#W#F (TMUX OTHER STATUS) #(pwd | sed -e "s|.*/\(.*/.*\)|\1|") " set -g window-status-format " #I:#W#F (TMUX OTHER STATUS) #(pwd | sed -e "s|.*/\(.*/.*\)|\1|") "
set -g window-status-current-format "#[fg=colour233,bg=black]#[fg=colour190,nobold] #(whoami)@#H #[fg=colour233,bg=black,nobold]" set -g window-status-current-format "#[fg=colour255,bg=colour233]#[fg=colour100,nobold] #(whoami)@#H #[fg=colour255,bg=colour233,nobold]"
# #{pane_current_path} # #{pane_current_path}
# Current window status # Current window status
@ -84,6 +98,9 @@ set -g message-style bg=colour100,fg=black
# Command message # Command message
set -g message-command-style bg=colour233,fg=black set -g message-command-style bg=colour233,fg=black
# Tmux Git status bar settings
# (Un)comment source-file to enable / disable
source-file "$HOME/.tmux-gitbar/tmux-gitbar.tmux" source-file "$HOME/.tmux-gitbar/tmux-gitbar.tmux"
set -g default-terminal "screen-256color" set -g default-terminal "screen-256color"