From e29bfd15942d9c0d7ba9e03ffb6e0de2f10e80bc Mon Sep 17 00:00:00 2001 From: Sarthak Jain Date: Fri, 17 Jul 2026 21:53:02 +0530 Subject: [PATCH] modify tmux --- tmux/.tmux.conf.local | 72 +++++++++++++++++---------------- tmux/tmux-window-name.sh | 86 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 123 insertions(+), 35 deletions(-) create mode 100755 tmux/tmux-window-name.sh diff --git a/tmux/.tmux.conf.local b/tmux/.tmux.conf.local index b79ba4c..64b72ac 100644 --- a/tmux/.tmux.conf.local +++ b/tmux/.tmux.conf.local @@ -71,29 +71,31 @@ tmux_conf_24b_colour=auto # - tmux_conf_theme_synchronized tmux_conf_theme=enabled -color_yellow="yellow" -color_reg="red" -color_green="green" -color_teal="teal" -color_white="white" -color_pink="pink" -color_black="black" -color_blue="blue" -color_mauve="#FFE3E3" -color_offwhite="#F9F9F2" -color_grey="grey" +# Carbonfox Color Palette +color_bg="#161616" +color_fg="#f2f4f8" +color_black="#282828" +color_gray="#353535" +color_light_gray="#484848" +color_red="#ee5396" +color_green="#25be6a" +color_teal="#3ddbd9" +color_blue="#78a9ff" +color_purple="#be95ff" +color_cyan="#33b1ff" +color_white="#dfdfe0" -color_accent="blue" +color_accent="$color_blue" color_primary="default" -color_secondary="$color_grey" -color_fg_primary="default" -color_fg_secondary="$color_offwhite" +color_secondary="$color_gray" +color_fg_primary="$color_fg" +color_fg_secondary="$color_white" window_status_current_bg="default" window_status_current_fg="$color_accent" theme_mode_bg="$color_accent" -theme_mode_fg="$color_fg_primary" +theme_mode_fg="$color_bg" tmux_conf_theme_window_fg="$color_fg_primary" # window style @@ -172,7 +174,7 @@ tmux_conf_theme_window_status_attr="none" # tmux_conf_theme_window_status_format="#I #W#{?#{||:#{window_bell_flag},#{window_zoomed_flag}}, ,}#{?window_bell_flag,!,}#{?window_zoomed_flag,Z,}" #tmux_conf_theme_window_status_format="#{circled_window_index} #W#{?#{||:#{window_bell_flag},#{window_zoomed_flag}}, ,}#{?window_bell_flag,!,}#{?window_zoomed_flag,Z,}" # tmux_conf_theme_window_status_format=" #I: #(despell -e #W) #W #{?#{||:#{window_bell_flag},#{window_zoomed_flag}}, ,}#{?window_bell_flag,🔔,}#{?window_zoomed_flag,🔍,}" -tmux_conf_theme_window_status_format=" #I:#W #{?#{||:#{window_bell_flag},#{window_zoomed_flag}}, ,}#{?window_bell_flag,🔔,}#{?window_zoomed_flag,🔍,}" +tmux_conf_theme_window_status_format="#[fg=$color_gray,bg=default]#[fg=$color_fg,bg=$color_gray]#I: #(bash /Users/jsarthak/dotfiles/tmux/tmux-window-name.sh '#W' '#{pane_current_path}')#{?#{||:#{window_bell_flag},#{window_zoomed_flag}}, ,}#{?window_bell_flag,🔔,}#{?window_zoomed_flag,🔍,}#[fg=$color_gray,bg=default]" # window current status style # - built-in variables are: @@ -187,7 +189,7 @@ tmux_conf_theme_window_status_format=" #I:#W #{?#{||:#{window_bell_flag},#{windo # tmux_conf_theme_window_status_current_format="#I #W#{?#{||:#{window_bell_flag},#{window_zoomed_flag}}, ,}#{?window_bell_flag,!,}#{?window_zoomed_flag,Z,}" #tmux_conf_theme_window_status_current_format="#{circled_window_index} #W#{?#{||:#{window_bell_flag},#{window_zoomed_flag}}, ,}#{?window_bell_flag,!,}#{?window_zoomed_flag,Z,}" # tmux_conf_theme_window_status_current_format="#I: #(despell -e #W) #[fg=$tmux_conf_theme_window_status_current_fg]#W*#{?#{||:#{window_bell_flag},#{window_zoomed_flag}}, ,}#{?window_bell_flag,🔔,}#{?window_zoomed_flag,🔍,}" -tmux_conf_theme_window_status_current_format="#I:#[fg=$tmux_conf_theme_window_status_current_fg]#W#{?#{||:#{window_bell_flag},#{window_zoomed_flag}}, ,}#{?window_bell_flag,🔔,}#{?window_zoomed_flag,🔍,}" +tmux_conf_theme_window_status_current_format="#[fg=$color_accent,bg=default]#[fg=$color_bg,bg=$color_accent,bold]#I: #(bash /Users/jsarthak/dotfiles/tmux/tmux-window-name.sh '#W' '#{pane_current_path}')#{?#{||:#{window_bell_flag},#{window_zoomed_flag}}, ,}#{?window_bell_flag,🔔,}#{?window_zoomed_flag,🔍,}#[fg=$color_accent,bg=default]" tmux_conf_theme_window_status_current_fg="$window_status_current_fg" tmux_conf_theme_window_status_current_bg="$window_status_current_bg" @@ -210,9 +212,9 @@ tmux_conf_theme_window_status_last_attr="bold" # status left/right sections separators tmux_conf_theme_left_separator_main="" -tmux_conf_theme_left_separator_sub="|" +tmux_conf_theme_left_separator_sub="" tmux_conf_theme_right_separator_main="" -tmux_conf_theme_right_separator_sub="\u2022" +tmux_conf_theme_right_separator_sub="" # tmux_conf_theme_left_separator_main='\uE0B0' # /!\ you don't need to install Powerline # tmux_conf_theme_left_separator_sub='\uE0B1' # yku only need fonts patched with # tmux_conf_theme_right_separator_main='\uE0B2' # Powerline symbols or the standalone @@ -247,18 +249,18 @@ tmux_conf_theme_right_separator_sub="\u2022" # - #{username} # - #{username_ssh} -tmux_conf_theme_status_left=" [#S]" -tmux_conf_theme_status_right=" #{prefix}#{mouse}#{pairing}#{synchronized} |\u2022 #{username}#{root} |\u2022 #{hostname} |\u2022 ↑ #{?uptime_y, #{uptime_y}y,}#{?uptime_d, #{uptime_d}d,}#{?uptime_h, #{uptime_h}h,}#{?uptime_m, #{uptime_m}m,} " +tmux_conf_theme_status_left=" ❐ #S #[fg=$color_accent,bg=default,none]" +tmux_conf_theme_status_right=" #{prefix}#{mouse}#{pairing}#{synchronized} |#[fg=default,bg=default] #[fg=$color_secondary,bg=default,none]#[fg=$color_fg,bg=$color_secondary,none]󰔚 #{?uptime_d,#{uptime_d}d,}#{?uptime_h,#{uptime_h}h,}#{?uptime_m,#{uptime_m}m,}#[fg=$color_secondary,bg=default,none] |#[fg=default,bg=default] #[fg=$color_purple,bg=default,none]#[fg=$color_bg,bg=$color_purple,bold]󰊪 #{username}#{root}@#{hostname}#[fg=$color_purple,bg=default,none] " # status left style -tmux_conf_theme_status_left_fg="$color_black,$color_fg_primary,$color_fg_primary" -tmux_conf_theme_status_left_bg="$color_primary,$color_primary,$color_primary" -tmux_conf_theme_status_left_attr="bold,none,none" +tmux_conf_theme_status_left_fg="$color_bg" +tmux_conf_theme_status_left_bg="$color_accent" +tmux_conf_theme_status_left_attr="bold" # status right style -tmux_conf_theme_status_right_fg="$color_fg_primary,$color_fg_primary,$color_fg_primary,$color_fg_primary" -tmux_conf_theme_status_right_bg="$color_primary,$color_primary,$color_primary,$color_primary" -tmux_conf_theme_status_right_attr="bold,none,bold,none" +tmux_conf_theme_status_right_fg="$color_red,$color_fg,$color_bg" +tmux_conf_theme_status_right_bg="default,$color_secondary,$color_purple" +tmux_conf_theme_status_right_attr="bold,none,bold" # pairing indicator tmux_conf_theme_pairing="⚇" # U+2687 @@ -267,14 +269,14 @@ tmux_conf_theme_pairing_bg="none" tmux_conf_theme_pairing_attr="none" # prefix indicator -tmux_conf_theme_prefix="⌨" # U+2328 -tmux_conf_theme_prefix_fg="none" +tmux_conf_theme_prefix="󰘳 " +tmux_conf_theme_prefix_fg="$color_red" tmux_conf_theme_prefix_bg="none" -tmux_conf_theme_prefix_attr="none" +tmux_conf_theme_prefix_attr="bold" # mouse indicator -tmux_conf_theme_mouse="↗" # U+2197 -tmux_conf_theme_mouse_fg="none" +tmux_conf_theme_mouse="󰍽 " +tmux_conf_theme_mouse_fg="$color_teal" tmux_conf_theme_mouse_bg="none" tmux_conf_theme_mouse_attr="none" @@ -285,8 +287,8 @@ tmux_conf_theme_root_bg="none" tmux_conf_theme_root_attr="bold,blink" # synchronized indicator -tmux_conf_theme_synchronized="⚏" # U+268F -tmux_conf_theme_synchronized_fg="none" +tmux_conf_theme_synchronized="󰓦 " +tmux_conf_theme_synchronized_fg="$color_green" tmux_conf_theme_synchronized_bg="none" tmux_conf_theme_synchronized_attr="none" diff --git a/tmux/tmux-window-name.sh b/tmux/tmux-window-name.sh new file mode 100755 index 0000000..f9c0c11 --- /dev/null +++ b/tmux/tmux-window-name.sh @@ -0,0 +1,86 @@ +#!/bin/bash +# tmux-window-name.sh - Auto emoji/icon plugin replacement for tmux window titles +# Zero dependencies, fast shell-based script mapping commands to Nerd Font glyphs. + +cmd="$1" +path="$2" + +# Get basename of the directory +base_dir=$(basename "$path") +if [ "$base_dir" = "$USER" ]; then + base_dir="~" +fi + +icon="" +name="$cmd" + +case "$cmd" in + zsh|bash|sh|fish|ksh) + icon="" + name="$base_dir" + ;; + nvim|vim|vi) + icon="" + name="nvim ($base_dir)" + ;; + emacs) + icon="" + name="emacs ($base_dir)" + ;; + git|lazygit|gh) + icon="" + name="${cmd} ($base_dir)" + ;; + node|npm|yarn|pnpm|bun) + icon="" + name="${cmd} ($base_dir)" + ;; + python|python3|pip|ipython) + icon="" + ;; + docker|docker-compose|lazydocker) + icon="" + name="${cmd} ($base_dir)" + ;; + cargo|rustc|rustup) + icon="" + name="${cmd} ($base_dir)" + ;; + go) + icon="" + ;; + htop|top|btop) + icon="󰓅" + ;; + curl|wget) + icon="󰖟" + ;; + man) + icon="󰈦" + ;; + less|more) + icon="📄" + ;; + make|cmake|just) + icon="🛠️" + ;; + ssh|scp|sftp|mosh-client|mosh) + icon="🔑" + ;; + sudo) + icon="🔒" + ;; + terraform|tofu) + icon="󱁢" + name="${cmd} ($base_dir)" + ;; + grep|rg|find|fd) + icon="🔍" + ;; + sleep) + icon="💤" + ;; +esac + +# Output the formatted name +echo "$icon $name"