Share your config here! #317
Replies: 13 comments 73 replies
-
Basic CPU and ram in the status line, using the theme colours. run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux
# windows
set -gF window-status-format "#[bg=#{@ctp_surface1},fg=#{@ctp_fg}] ##I ##T "
set -gF window-status-current-format "#[bg=#{@ctp_mauve},fg=#{@ctp_crust}] ##I ##T "
set -g @cpu_low_bg_color "#[bg=#{@thm_green}]" # background color when cpu is low
set -g @cpu_medium_bg_color "#[bg=#{@thm_yellow}]" # background color when cpu is medium
set -g @cpu_high_bg_color "#[bg=#{@thm_red}]" # background color when cpu is high
set -g status-left ""
set -g status-right '#[fg=#{@thm_crust}]#{cpu_bg_color} CPU #{cpu_icon} #{cpu_percentage} '
set -ag status-right '#[bg=default] #[bg=#{@thm_flamingo}] MEM #{ram_percentage} '
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-cpu'
run ~/.tmux/plugins/tpm/tpm |
Beta Was this translation helpful? Give feedback.
-
set -g @catppuccin_flavor 'frappe'
set -g status-right-length 100
set -g status-left ""
# Window
set -g @catppuccin_window_status_style "custom"
set -g window-status-separator ""
## Window global/default configuration
set -g @catppuccin_window_default_text " #{window_name}"
set -g @catppuccin_window_status "icon"
set -g @catppuccin_window_default_fill "number"
set -g @catppuccin_window_number_position "left"
set -g @catppuccin_window_left_separator "█"
set -g @catppuccin_window_middle_separator "█"
set -g @catppuccin_window_right_separator "█"
## Window current configuration
set -g @catppuccin_window_current_text "#{window_name}"
set -g @catppuccin_window_current_fill "all"
set -g @catppuccin_window_current_middle_separator "#[reverse] #[noreverse]"
# Status modules config
set -g @catppuccin_date_time_text "%d-%m %H:%M"
# Run plugin
run ~/projects/catppuccin-tmux/catppuccin.tmux
# Status
set -gF status-right "#{@catppuccin_status_directory}"
set -agF status-right "#{@catppuccin_status_session}"
set -agF status-right "#{@catppuccin_status_user}"
set -agF status-right "#{@catppuccin_status_host}"
set -agF status-right "#{E:@catppuccin_status_date_time}" |
Beta Was this translation helpful? Give feedback.
-
Config with own custom modules and standard modules. Configuration updated to v2.1.0: ### configure Tmux Plugin Manager
set-environment -gF TMUX_PLUGIN_MANAGER_PATH '#{HOME}/.local/share/tmux/plugins/'
if 'test ! -d "${TMUX_PLUGIN_MANAGER_PATH}/tpm"' {
run 'mkdir -p "${TMUX_PLUGIN_MANAGER_PATH}"'
run 'git clone https://github.com/tmux-plugins/tpm "${TMUX_PLUGIN_MANAGER_PATH}/tpm"'
run '${TMUX_PLUGIN_MANAGER_PATH}/tpm/bin/install_plugins'
}
set -g @plugin 'tmux-plugins/tpm'
#
# basic plugins
set -g @plugin 'tmux-plugins/tmux-yank'
#
# theme / style
set -g @plugin 'catppuccin/tmux'
set -g @plugin 'joshmedeski/tmux-nerd-font-window-name'
set -g @plugin 'alexwforsythe/tmux-which-key' # prefix + space
set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'dreknix/tmux-primary-ip'
#
# tooling
set -g @plugin 'omerxx/tmux-sessionx' # prefix + o
### configure plugins
### https://github.com/catppuccin/tmux
set -g @catppuccin_flavor 'mocha'
set -g @catppuccin_window_status_style 'rounded'
set -g @catppuccin_window_number_position 'right'
set -g @catppuccin_window_status 'no'
set -g @catppuccin_window_default_text '#W'
set -g @catppuccin_window_current_fill 'number'
set -g @catppuccin_window_current_text '#W'
set -g @catppuccin_window_current_color '#{E:@thm_surface_2}'
set -g @catppuccin_date_time_text '%d.%m. %H:%M'
set -g @catppuccin_status_module_text_bg '#{E:@thm_mantle}'
# source the plugin here
run '#{TMUX_PLUGIN_MANAGER_PATH}/tmux/catppuccin.tmux'
# load custom moudules
source -F '#{d:current_file}/custom_modules/ctp_cpu.conf'
source -F '#{d:current_file}/custom_modules/ctp_memory.conf'
source -F '#{d:current_file}/custom_modules/primary_ip.conf'
# set left and right status bar
set -g allow-rename off
set -g status-position top
set -g status-interval 5
set -g status-left-length 100
set -g status-right-length 100
set -g status-left '#{E:@catppuccin_status_session} '
set -gF status-right '#{E:@catppuccin_status_primary_ip}'
set -agF status-right '#{E:@catppuccin_status_ctp_cpu}'
set -agF status-right '#{E:@catppuccin_status_ctp_memory}'
if 'test -r /sys/class/power_supply/BAT*' {
set -agF status-right '#{E:@catppuccin_status_battery}'
}
set -ag status-right '#{E:@catppuccin_status_date_time}'
### general config
# set ctrl-a as second prefix
set -g prefix2 C-a
bind C-a send-prefix -2
# start index at 1
set -g base-index 1
set -g pane-base-index 1
# renumber when window is closed
set -g renumber-window on
# enable 256-colors
set -g default-terminal 'screen-256color'
set -ag terminal-overrides ',xterm-256color*:RGB'
# initialize tmux plugin manager and source all plugins
run '#{TMUX_PLUGIN_MANAGER_PATH}/tpm/tpm'
%hidden MODULE_NAME="ctp_cpu"
set -gq '@cpu_low_bg_color' '#{E:@thm_green}'
set -gq '@cpu_medium_bg_color' '#{E:@thm_yellow}'
set -gq '@cpu_high_bg_color' '#{E:@thm_red}'
set -gq "@catppuccin_${MODULE_NAME}_icon" ' '
set -gq "@catppuccin_${MODULE_NAME}_color" '#{l:#{cpu_bg_color}}'
set -gq "@catppuccin_${MODULE_NAME}_text" '#{l:#{cpu_percentage}}'
source -F '#{TMUX_PLUGIN_MANAGER_PATH}/tmux/utils/status_module.conf'
%hidden MODULE_NAME='ctp_memory'
set -gq '@ram_low_bg_color' '#{E:@thm_green}'
set -gq '@ram_medium_bg_color' '#{E:@thm_yellow}'
set -gq '@ram_high_bg_color' '#{E:@thm_red}'
set -gq "@catppuccin_${MODULE_NAME}_icon" ' '
set -gq "@catppuccin_${MODULE_NAME}_color" '#{l:#{ram_bg_color}}'
set -gq "@catppuccin_${MODULE_NAME}_text" '#{l:#{ram_percentage}}'
source -F '#{TMUX_PLUGIN_MANAGER_PATH}/tmux/utils/status_module.conf'
%hidden MODULE_NAME='primary_ip'
set -gq "@catppuccin_${MODULE_NAME}_icon" '#{l:#{primary_ip_icon}} '
set -gqF "@catppuccin_${MODULE_NAME}_color" '#{E:@thm_lavender}'
set -gq "@catppuccin_${MODULE_NAME}_text" '#{l:#{primary_ip}}'
source -F '#{TMUX_PLUGIN_MANAGER_PATH}/tmux/utils/status_module.conf' |
Beta Was this translation helpful? Give feedback.
-
Here's my Zellij classic layout style inspired config. Requires #413 to be merged first. left number position: set -g @catppuccin_window_number_position "left"
set -g @catppuccin_window_current_number_color "#{@thm_green}"
set -g @catppuccin_window_text ""
set -g @catppuccin_window_number "#[bold]Tab ###I "
set -g @catppuccin_window_current_text ""
set -g @catppuccin_window_current_number "#[bold]Tab ###I "
set -g @catppuccin_window_status_style "custom"
set -g @catppuccin_window_right_separator "#[fg=#{@_ctp_status_bg},reverse]#[none]"
set -g @catppuccin_window_left_separator "#[fg=#{@_ctp_status_bg}] #[none]"
set -g @catppuccin_window_middle_separator "#[bg=#{@catppuccin_window_text_color},fg=#{@catppuccin_window_number_color}]"
set -g @catppuccin_window_current_middle_separator "#[bg=#{@catppuccin_window_current_text_color},fg=#{@catppuccin_window_current_number_color}]"
# Run plugin
run ~/projects/catppuccin-tmux/catppuccin.tmux
set -g window-status-separator ""
set -g status-left-length 0
set -g status-left "#[fg=#{@thm_fg} bold]TMUX (#S) "
set -ga status-left "#{?client_prefix,#[fg=#{@thm_red} bold]PREFIX ,#{?#{==:#{pane_mode},copy-mode},#[fg=#{@thm_yellow} bold]COPY ,#[fg=#{@thm_green} bold]NORMAL }}"
set -g status-right "" right number position: set -g @catppuccin_window_number_position "right"
set -g @catppuccin_window_current_number_color "#{@thm_green}"
set -g @catppuccin_window_text ""
set -g @catppuccin_window_number "#[bold]Tab ###I "
set -g @catppuccin_window_current_text ""
set -g @catppuccin_window_current_number "#[bold]Tab ###I "
set -g @catppuccin_window_status_style "custom"
set -g @catppuccin_window_right_separator "#[fg=#{@_ctp_status_bg},reverse]#[none]"
set -g @catppuccin_window_left_separator "#[fg=#{@_ctp_status_bg}]#[none]"
set -g @catppuccin_window_middle_separator "#[bg=#{@catppuccin_window_number_color},fg=#{@catppuccin_window_text_color}]"
set -g @catppuccin_window_current_middle_separator "#[bg=#{@catppuccin_window_current_number_color},fg=#{@catppuccin_window_current_text_color}]"
# Run plugin
run ~/projects/catppuccin-tmux/catppuccin.tmux
set -g window-status-separator ""
set -g status-left-length 0
set -g status-left "#[fg=#{@thm_fg} bold]TMUX (#S) "
set -ga status-left "#{?client_prefix,#[fg=#{@thm_red} bold]PREFIX ,#{?#{==:#{pane_mode},copy-mode},#[fg=#{@thm_yellow} bold]COPY ,#[fg=#{@thm_green} bold]NORMAL }}"
set -g status-right "" |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Loved your application @89iuv and your riff on it @GoFightNow ! Turned out to be a nice distinction from my already bubble style in Nvim. I extended this a little by removing the window icon and using Josh Medeski's tmux-nerd-font-window-name to insert the icon before the name. Would really like to add some padding above it though to separate. I tried messing around with border-pane (which was a good balance spacing wise) but can't seem to get rid of the border line, even setting it to black, colour0, bg. Just stays white or overridden by the terminal, but I don't want to change the border colors overall. Any other suggestions welcome.
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Here's mine. Took me a while but I was able to make what I was trying to do merging some configurations I've seen here
|
Beta Was this translation helpful? Give feedback.
-
Loaded with lot of thing as well are pure transparent added icons and other things as well
|
Beta Was this translation helpful? Give feedback.
-
Click to show configunbind r
bind r source-file ~/.tmux.conf
set -g mouse on
set -g prefix C-z
bind C-z send-prefix
bind C-l send-keys 'C-l'
set -g status-right-length 100
set -g status-left-length 100
set-option -g status-position top
set-option -sg escape-time 10
set-option -g focus-events on
set-option -a terminal-features 'xterm-256color:RGB'
set -g default-terminal "screen-256color"
# Image Rendering
set -g allow-passthrough on
set -ga update-environment TERM
set -ga update-environment TERM_PROGRAM
# keybindings
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
# act like vim
setw -g mode-keys vi
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# Shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
# Shift Alt vim keys to switch windows
bind -n M-H previous-window
bind -n M-L next-window
# Use Alt-arrow keys without prefix key to switch panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Initialize TPM (Tmux Plugin Manager)
set -g @plugin 'tmux-plugins/tpm'
# List of plugins
set -g @plugin 'catppuccin/tmux'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'b0o/tmux-autoreload'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'sainnhe/tmux-fzf'
set -g @plugin 'omerxx/tmux-sessionx'
set -g @plugin 'omerxx/tmux-floax'
set -g @plugin 'joshmedeski/tmux-nerd-font-window-name'
set -g @plugin 'alexwforsythe/tmux-which-key'
set -g @plugin 'richin13/tmux-plugin-playerctl'
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
set -g @catppuccin_flavor "mocha"
set -g @catppuccin_status_left_separator " "
set -g @catppuccin_status_right_separator ""
set -g @catppuccin_window_status_style "rounded"
set -g @catppuccin_window_number_position "right"
set -g @catppuccin_window_default_fill "number"
set -g @catppuccin_window_default_text "#W"
set -g @catppuccin_window_current_fill "number"
set -g @catppuccin_window_text "#{?#{!=:#W,zsh},#W,#T}"
set -g @catppuccin_window_current_text "#{?#{!=:#W,zsh},#W,#T}"
set -g @catppuccin_status_fill "icon"
set -g @catppuccin_status_connect_separator "no"
set -g @catppuccin_date_time_text " %I:%M %p"
set -g @catppuccin_window_default_background "#{@thm_blue}"
set -g @catppuccin_window_current_background "#{@thm_peach}"
set -g @catppuccin_window_default_color "#{@thm_surface_1}"
set -g @catppuccin_window_current_color "#{@thm_bg}"
set -g @catppuccin_session_color "#{E:@thm_green}"
# Playerctl options
set -g @short_length "15"
set -g @status_playing ""
set -g @status_paused " "
set -g @status_stopped " Stopped"
run '~/.tmux/plugins/tmux/catppuccin.tmux'
# Left
set -g status-left " "
set -ag status-left "#[bg=#{?client_prefix,#{E:@thm_red},#{@thm_surface_0}},fg=#{@thm_bg}]#[reverse]#[noreverse]"
set -ag status-left "#[fg=#{@thm_blue},bg=#{?client_prefix,#{E:@thm_red},#{@thm_surface_0}}] "
set -ag status-left "#[fg=#{@thm_bg},bg=#{?client_prefix,#{E:@thm_red},#{@thm_surface_0}},reverse]#[none]"
set -ag status-left "#[bg=#{@thm_bg}] "
set -ag status-left "#[bg=#{@thm_red},fg=#{@thm_bg}]#[reverse]#[noreverse] "
set -ag status-left "#[fg=#{@thm_fg},bg=#{@thm_surface_0}] #{playerctl_status} #{playerctl_short}"
set -ag status-left "#[fg=#{@thm_bg},bg=#{@thm_surface_0},reverse]#[none]"
set -ag status-left "#[bg=#{@thm_bg}] "
# Right
set -g status-right "#{E:@catppuccin_status_session}"
set -agF status-right "#{E:@catppuccin_status_weather} "
set -ag status-right "#[bg=#{@thm_flamingo},fg=#{@thm_bg}]#[reverse]#[noreverse] "
set -ag status-right "#[fg=#{@thm_fg},bg=#{@thm_surface_0}] %d.%m.%Y"
set -ag status-right "#[fg=#{@thm_bg},bg=#{@thm_surface_0},reverse]#[none]"
set -ag status-right "#{E:@catppuccin_status_date_time}"
set -ag status-right "#[bg=#{@thm_bg}] "
set -g @plugin 'xamut/tmux-weather'
set -g @resurrect-strategy-nvim 'session'
set -g @resurrect-capture-pane-contents 'on'
set -g @sessionx-ls-command 'eza --tree --level=2 --icons --git'
set -g @sessionx-zoxide-mode 'on'
run '~/.tmux/plugins/tpm/tpm'
set -g status-bg default
set -g status-style bg=default |
Beta Was this translation helpful? Give feedback.
-
Heavy "inspiration" taken from tokyo night tmux: https://github.com/janoamaral/tokyo-night-tmux Dotfiles: https://github.com/89iuv/dotfiles Click to show config# Status
set -g status-interval 1
set -g escape-time 20
set -g repeat-time 350
set -g display-time 1500
# Terminal colors
set -g default-terminal "tmux-256color"
set -as terminal-overrides ',*:RGB'
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
set -as terminal-overrides ',*:Setulc=\E[58::2::::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0
# set image support
set -gq allow-passthrough all
set -g visual-activity off
# set terminal title
set -g set-titles on
set -g set-titles-string "#S"
# Enable gapeless window
set -g renumber-windows on
# Make index start from 1
set -g base-index 1
setw -g pane-base-index 1
# Set scrollback size
set -g history-limit 9000
# set foncus events on for nvim
set -g focus-events on
# Do not detach when destroying a session
set -g detach-on-destroy off
# Enable mouse mode (tmux 2.1 and above)
set -g mouse on
# reload config file
bind r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
# Change prefix key
unbind c-b
set-option -g prefix M-u
bind M-x send-prefix
# Overview
bind w choose-tree -Z
# Sessions
bind -n M-9 switch-client -p
bind -n M-0 switch-client -n
# Windows
bind c new-window
bind -n M-\, previous-window
bind -n M-\. next-window
bind -n M-\< swap-window -t -1\; select-window -t -1
bind -n M-\> swap-window -t +1\; select-window -t +1
# Pane
bind v split-window -h -c "#{pane_current_path}"
bind s split-window -v -c "#{pane_current_path}"
bind V choose-tree -F "#{E:@custom_choose_tree_format}" -Z "join-pane -h -s "%%""
bind S choose-tree -F "#{E:@custom_choose_tree_format}" -Z "join-pane -v -s "%%""
bind b if-shell " [ #{window_panes} -gt '1' ] " { break-pane -a }
bind -r \} swap-pane -U
bind -r \{ swap-pane -D
bind -r Space next-layout
# copy mode tmux keybindings
bind n copy-mode \; send "0"
bind p paste-buffer
# copy mode vim keybindings
bind -T copy-mode-vi v send -X rectangle-off \; send -X begin-selection
bind -T copy-mode-vi C-q send -X rectangle-on \; send -X begin-selection
bind -T copy-mode-vi y send -X copy-selection
bind -T copy-mode-vi K send -X halfpage-up
bind -T copy-mode-vi J send -X halfpage-down
bind -T copy-mode-vi "Escape" send -X cancel
bind -T copy-mode-vi "i" send -X cancel
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'catppuccin/tmux'
# Configure Cpu
set -g @cpu_percentage_format "%03d%%"
set -g @cpu_low_fg_color "#{E:#{@thm_green}}"
set -g @cpu_medium_fg_color "#{E:#{@thm_yellow}}"
set -g @cpu_high_fg_color "#{E:#{@thm_red}}"
set -g @cpu_medium_thresh "80"
set -g @cpu_high_thresh "90"
# Configure Mem
set -g @ram_percentage_format "%03d%%"
set -g @ram_low_fg_color "#{E:#{@thm_green}}"
set -g @ram_medium_fg_color "#{E:#{@thm_yellow}}"
set -g @ram_high_fg_color "#{E:#{@thm_red}}"
set -g @ram_medium_thresh "80"
set -g @ram_high_thresh "90"
# Configure battery
set -g @batt_icon_charge_tier8 ''
set -g @batt_icon_charge_tier7 ''
set -g @batt_icon_charge_tier6 ''
set -g @batt_icon_charge_tier5 ''
set -g @batt_icon_charge_tier4 ''
set -g @batt_icon_charge_tier3 ''
set -g @batt_icon_charge_tier2 ''
set -g @batt_icon_charge_tier1 ''
set -g @batt_icon_status_charged ''
set -g @batt_icon_status_charging ''
set -g @batt_icon_status_discharging ''
set -g @batt_icon_status_attached ''
set -g @batt_icon_status_unknown ''
set -g @batt_color_charge_primary_tier8 "#{E:#{@thm_mauve}}"
set -g @batt_color_charge_primary_tier7 "#{E:#{@thm_mauve}}"
set -g @batt_color_charge_primary_tier6 "#{E:#{@thm_mauve}}"
set -g @batt_color_charge_primary_tier5 "#{E:#{@thm_mauve}}"
set -g @batt_color_charge_primary_tier4 "#{E:#{@thm_mauve}}"
set -g @batt_color_charge_primary_tier3 "#{E:#{@thm_pink}}"
set -g @batt_color_charge_primary_tier2 "#{E:#{@thm_yellow}}"
set -g @batt_color_charge_primary_tier1 "#{E:#{@thm_red}}"
set -g @batt_color_status_primary_charged "#{E:#{@thm_mauve}}"
set -g @batt_color_status_primary_charging "#{E:#{@thm_mauve}}"
set -g @batt_color_status_primary_discharging "#{E:#{@thm_red}}"
set -g @batt_color_status_primary_attached "#{E:#{@thm_mauve}}"
set -g @batt_color_status_primary_unknown "#{E:#{@thm_mauve}}"
# Configure Catppuccin
set -g @catppuccin_flavor "mocha"
set -g @catppuccin_status_background "none" # none == default
set -g @catppuccin_pane_status_enabled "off"
set -g @catppuccin_pane_border_status "off"
# Style
set -g @custom_status_separator "#[fg=#{@thm_surface_2},bg=default,none]"
set -g @custom_status_inline "|"
set -g @custom_text "#[fg=#{@thm_subtext_0}]"
# status left look and feel
set -g status-left-length 80
set -g status-left ""
# status left modules
set -ga status-left "#[fg=#{@thm_green}]#{?client_prefix,#[fg=#{@thm_red}]#[bold],} #S #[none]"
# status right look and feel
set -g status-right-length 160
set -g status-right ""
# status right modules
set -ga status-right "#{E:#{@custom_status_separator}}"
set -ga status-right "#[fg=#{@thm_blue}]#{E:#{@custom_status_inline}} #{E:#{@custom_text}}#{b:pane_current_path} "
set -ga status-right "#{E:#{@custom_status_separator}}"
set -ga status-right "#[fg=#{cpu_fg_color}]#{E:#{@custom_status_inline}} #{E:#{@custom_text}}#{cpu_percentage} "
set -ga status-right "#{E:#{@custom_status_separator}}"
set -ga status-right "#[fg=#{ram_fg_color}]#{E:#{@custom_status_inline}} #{E:#{@custom_text}}#{ram_percentage} "
set -ga status-right "#{E:#{@custom_status_separator}}"
set -ga status-right "#{battery_color_fg}#[bg=default]#{E:#{@custom_status_inline}} #{battery_icon} #{E:#{@custom_text}}#(~/.tmux/plugins/tmux-battery/scripts/battery_percentage.sh | sed 's/%%//' | xargs printf %%03d)%% "
set -ga status-right "#{E:#{@custom_status_separator}}"
set -ga status-right "#[fg=#{@thm_lavender}]#{E:#{@custom_status_inline}} #{E:#{@custom_text}}%Y-%m-%d %H:%M:%S "
# bootstrap tpm
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
# Configure Tmux
set -g status-position bottom
set -g status-style "bg=#{@thm_mantle}"
set -g status-justify "left"
# pane border look and feel
setw -g pane-border-status off
setw -g pane-border-format ""
setw -g pane-active-border-style "fg=#{@thm_peach},bg=default"
setw -g pane-border-style "fg=#{@thm_overlay_2},bg=default"
setw -g pane-border-lines single
# command line look and feel
set -g message-style "bg=#{@thm_bg}, fg=#{@thm_fg}"
set -g message-command-style "bg=#{@thm_mantle}, fg=#{@thm_fg}"
default_window_terminal="#[fg=#{@thm_overlay_0}] "
default_window_number="#[fg=#{@thm_overlay_0}]#(~/.tmux/custom_number.sh '#I' 'dsquare')"
default_window_name="#[fg=#{@thm_overlay_0}]#{?#{==:#{window_name},window},#{pane_current_command},#W}"
default_window_panes="#[fg=#{@thm_surface_1}]#(~/.tmux/custom_number.sh '#{window_panes}' 'hsquare')"
default_window_flags="#[fg=#8C806F]\
#{?#{window_marked_flag}, ,}\
#{?#{window_zoomed_flag}, ,}\
#{?#{window_last_flag}, ,}\
"
current_window_terminal="#[fg=#{@thm_maroon}] "
current_window_number="#[fg=#{@thm_peach}]#(~/.tmux/custom_number.sh '#I' 'msquare')"
current_window_name="#[fg=#{@thm_fg}]#{?#{==:#{window_name},window},#{pane_current_command},#W}"
current_window_panes="#[fg=#{@thm_overlay_2}]#(~/.tmux/custom_number.sh '#{window_panes}' 'hsquare')"
current_window_flags="#[fg=#{@thm_yellow}]\
#{?#{window_marked_flag}, ,}\
#{?#{window_zoomed_flag}, ,}\
"
# window status format
set -gF window-status-separator "#[fg=#{@thm_surface_2}]"
set -g window-status-format " $default_window_terminal$default_window_number$default_window_name $default_window_panes$default_window_flags "
set -g window-status-style "bg=default"
# window status current format
set -g window-status-current-format " $current_window_terminal$current_window_number$current_window_name $current_window_panes$current_window_flags "
set -g window-status-current-style "bg=#{@thm_bg},bold"
Extra script for converting numbers to nerd font iconsAdd this script to ~/.tmux/custom_number.sh #!/bin/bash
format_hide=""
format_none="0123456789"
format_fsquare=""
format_hsquare=""
format_dsquare=""
format_msquare=""
format_super="⁰¹²³⁴⁵⁶⁷⁸⁹"
format_sub="₀₁₂₃₄₅₆₇₈₉"
ID=$1
FORMAT=${2:-none}
# Preserve leading whitespace for bash
format="$(eval echo \"\$format_${FORMAT}\")"
if [ "$FORMAT" = "hide" ]; then
exit 0
fi
if [ -z "$format" ]; then
echo "Invalid format: $FORMAT"
exit 1
fi
# If format is roman numerals (-r), only handle IDs of 1 digit
if [ "$FORMAT" = "roman" ] && [ ${#ID} -gt 1 ]; then
echo -n "$ID "
else
for ((i = 0; i < ${#ID}; i++)); do
DIGIT=${ID:i:1}
echo -n "${format:DIGIT:1} "
done
fi
This is a copy paste from https://github.com/janoamaral/tokyo-night-tmux/blob/master/src/custom-number.sh |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Showcase your tmux configuration :)
Beta Was this translation helpful? Give feedback.
All reactions