-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Status line separators on windows? #419
Comments
Hey @parkerault 👋 Can you please give the |
This looks like it will solve a lot of my problems. Is it possible to create custom variables for arbitrary colors?
Or do those only work in the status line strings? Edit: Or can I just use the same variable syntax as the theme colors?
|
Yep see the latest |
I pushed more to the I gave back control of spacing/padding to the user. Now the default values for
Pay attention to the padding spaces |
Wait not sure I'll keep that as it's backward compatible |
Hey @parkerault 👋 I just force pushed the
|
I pushed another commit |
What OS and shell are you using BTW? |
I'm using Windows 10 with Windows Terminal. This is my config on a43ac95, using Gruvbox theme colors and Fira Code. (You can see that it works quite well, which is why I made #405 to recommend it over mintty for wsl, which went poorly when I tried it. Ligatures, tmux, vim, and all of the other usual suspects work out of the box). |
I'll polish branch As far as I can tell, separators now render nicely with status line background color. |
Smashing! Thank you so much for being so responsive. I'm sure you didn't expect it to be this much trouble. Unfortunately it looks like the This is the window status config in the second screenshot: tmux_conf_theme_window_status_fg="default"
tmux_conf_theme_window_status_bg="default"
tmux_conf_theme_window_status_attr="none"
tmux_conf_theme_window_status_format="#I #W"
#tmux_conf_theme_window_status_format="#{circled_window_index} #W"
#tmux_conf_theme_window_status_format="#I #W#{?window_bell_flag,🔔,}#{?window_zoomed_flag,🔍,}"
# window current status style
# - built-in variables are:
# - #{circled_window_index}
# - #{circled_session_name}
# - #{hostname}
# - #{hostname_ssh}
# - #{username}
# - #{username_ssh}
tmux_conf_theme_window_status_current_fg="$fg"
tmux_conf_theme_window_status_current_bg="$brightblue"
tmux_conf_theme_window_status_current_attr="bold"
tmux_conf_theme_window_status_current_format=" #I #W "
#tmux_conf_theme_window_status_current_format="#{circled_window_index} #W"
#tmux_conf_theme_window_status_current_format="#I #W#{?window_zoomed_flag,🔍,}"
# window activity status style
tmux_conf_theme_window_status_activity_fg="default"
tmux_conf_theme_window_status_activity_bg="default"
tmux_conf_theme_window_status_activity_attr="underscore"
# window bell status style
tmux_conf_theme_window_status_bell_fg="$yellow"
tmux_conf_theme_window_status_bell_bg="default"
tmux_conf_theme_window_status_bell_attr="blink,bold"
# window last status style
tmux_conf_theme_window_status_last_fg="$blue"
tmux_conf_theme_window_status_last_bg="$fg4"
tmux_conf_theme_window_status_last_attr="none" |
I changed nothing about Are you sure resetting the |
Also can you please give me your |
Yeah, I'm up to date on gh-419. Git log:
Here is my entire .tmux.conf.local:# : << EOF
# https://github.com/gpakosz/.tmux
# (‑●‑●)> dual licensed under the WTFPL v2 license and the MIT license,
# without any warranty.
# Copyright 2012— Gregory Pakosz (@gpakosz).
# -- navigation ----------------------------------------------------------------
# if you're running tmux within iTerm2
# - and tmux is 1.9 or 1.9a
# - and iTerm2 is configured to let option key act as +Esc
# - and iTerm2 is configured to send [1;9A -> [1;9D for option + arrow keys
# then uncomment the following line to make Meta + arrow keys mapping work
#set -ga terminal-overrides "*:kUP3=\e[1;9A,*:kDN3=\e[1;9B,*:kRIT3=\e[1;9C,*:kLFT3=\e[1;9D"
# -- windows & pane creation ---------------------------------------------------
# new window retains current path, possible values are:
# - true
# - false (default)
tmux_conf_new_window_retain_current_path=false
# new pane retains current path, possible values are:
# - true (default)
# - false
tmux_conf_new_pane_retain_current_path=true
# new pane tries to reconnect ssh sessions (experimental), possible values are:
# - true
# - false (default)
tmux_conf_new_pane_reconnect_ssh=false
# prompt for session name when creating a new session, possible values are:
# - true
# - false (default)
tmux_conf_new_session_prompt=false
# -- display -------------------------------------------------------------------
# RGB 24-bit colour support (tmux >= 2.2), possible values are:
# - true
# - false (default)
tmux_conf_24b_colour=true
bg="#282828" # default, darkest BG
bg0_h="#1d2021" # high contrast
bg0_s="#32302f" # low contrast
bg1="#3c3836"
bg2="#504945"
bg3="#665c54"
bg4="#7c6f64" # lightest BG
gray="#928374"
brightgray="#a89984"
fg4="#a89984" # darkest FG
fg3="#bdae93"
fg2="#d5c4a1"
fg1="#ebdbb2" # default FG
fg0="#fbf1c7" # lightest FG
red="#cc241d"
brightred="#fb4934"
green="#98971a"
brightgreen="#b8bb26"
yellow="#d79921"
brightyellow="#fabd2f"
blue="#458588"
brightblue="#83a598"
purple="#b16286"
brightpurple="#d3869b"
aqua="#689d6a"
brightaqua="#8ec07c"
orange="#d65d0e"
brightorange="#fe8019"
# default theme
tmux_conf_theme_colour_1="#080808" # dark gray
tmux_conf_theme_colour_2="#303030" # gray
tmux_conf_theme_colour_3="#8a8a8a" # light gray
tmux_conf_theme_colour_4="#00afff" # light blue
tmux_conf_theme_colour_5="#ffff00" # yellow
tmux_conf_theme_colour_6="#080808" # dark gray
tmux_conf_theme_colour_7="#e4e4e4" # white
tmux_conf_theme_colour_8="#080808" # dark gray
tmux_conf_theme_colour_9="#ffff00" # yellow
tmux_conf_theme_colour_10="#ff00af" # pink
tmux_conf_theme_colour_11="#5fff00" # green
tmux_conf_theme_colour_12="#8a8a8a" # light gray
tmux_conf_theme_colour_13="#e4e4e4" # white
tmux_conf_theme_colour_14="#080808" # dark gray
tmux_conf_theme_colour_15="#080808" # dark gray
tmux_conf_theme_colour_16="#d70000" # red
tmux_conf_theme_colour_17="#e4e4e4" # white
# default theme (ansi)
#tmux_conf_theme_colour_1="colour0"
#tmux_conf_theme_colour_2="colour8"
#tmux_conf_theme_colour_3="colour8"
#tmux_conf_theme_colour_4="colour14"
#tmux_conf_theme_colour_5="colour11"
#tmux_conf_theme_colour_6="colour0"
#tmux_conf_theme_colour_7="colour15"
#tmux_conf_theme_colour_8="colour0"
#tmux_conf_theme_colour_9="colour11"
#tmux_conf_theme_colour_10="colour13"
#tmux_conf_theme_colour_11="colour10"
#tmux_conf_theme_colour_12="colour8"
#tmux_conf_theme_colour_13="colour15"
#tmux_conf_theme_colour_14="colour0"
#tmux_conf_theme_colour_15="colour0"
#tmux_conf_theme_colour_16="colour1"
#tmux_conf_theme_colour_17="colour15"
# window style
tmux_conf_theme_window_fg="$bg4"
tmux_conf_theme_window_bg="$bg1"
# highlight focused pane (tmux >= 2.1), possible values are:
# - true
# - false (default)
tmux_conf_theme_highlight_focused_pane=true
# focused pane colours:
tmux_conf_theme_focused_pane_bg="$bg0_s"
tmux_conf_theme_focused_pane_fg="$fg1"
# pane border style, possible values are:
# - thin (default)
# - fat
tmux_conf_theme_pane_border_style=fat
# pane borders colours:
tmux_conf_theme_pane_border="$bg0_s"
tmux_conf_theme_pane_active_border="$bg0_s"
# pane indicator colours (when you hit <prefix> + q)
tmux_conf_theme_pane_indicator="$bg2"
tmux_conf_theme_pane_active_indicator="$fg0"
# status line style
tmux_conf_theme_message_fg="$bg"
tmux_conf_theme_message_bg="$fg1"
tmux_conf_theme_message_attr="bold"
# status line command style (<prefix> : Escape)
tmux_conf_theme_message_command_fg="$bg"
tmux_conf_theme_message_command_bg="$fg1"
tmux_conf_theme_message_command_attr="bold"
# window modes style
tmux_conf_theme_mode_fg="$bg"
tmux_conf_theme_mode_bg="$fg1"
tmux_conf_theme_mode_attr="bold"
# status line style
tmux_conf_theme_status_fg="$fg3"
tmux_conf_theme_status_bg="$bg1"
tmux_conf_theme_status_attr="none"
# terminal title
# - built-in variables are:
# - #{circled_window_index}
# - #{circled_session_name}
# - #{hostname}
# - #{hostname_ssh}
# - #{username}
# - #{username_ssh}
tmux_conf_theme_terminal_title="#h :: #S :: #I #W"
# window status style
# - built-in variables are:
# - #{circled_window_index}
# - #{circled_session_name}
# - #{hostname}
# - #{hostname_ssh}
# - #{username}
# - #{username_ssh}
tmux_conf_theme_window_status_fg="$bg"
tmux_conf_theme_window_status_bg="$bg4"
tmux_conf_theme_window_status_attr="none"
tmux_conf_theme_window_status_format="#I #W"
#tmux_conf_theme_window_status_format="#{circled_window_index} #W"
#tmux_conf_theme_window_status_format="#I #W#{?window_bell_flag,🔔,}#{?window_zoomed_flag,🔍,}"
# window current status style
# - built-in variables are:
# - #{circled_window_index}
# - #{circled_session_name}
# - #{hostname}
# - #{hostname_ssh}
# - #{username}
# - #{username_ssh}
tmux_conf_theme_window_status_current_fg="$fg"
tmux_conf_theme_window_status_current_bg="$brightgreen"
tmux_conf_theme_window_status_current_attr="bold"
tmux_conf_theme_window_status_current_format="#I #W"
#tmux_conf_theme_window_status_current_format="#{circled_window_index} #W"
#tmux_conf_theme_window_status_current_format="#I #W#{?window_zoomed_flag,🔍,}"
# window activity status style
tmux_conf_theme_window_status_activity_fg="default"
tmux_conf_theme_window_status_activity_bg="default"
tmux_conf_theme_window_status_activity_attr="underscore"
# window bell status style
tmux_conf_theme_window_status_bell_fg="$yellow"
tmux_conf_theme_window_status_bell_bg="default"
tmux_conf_theme_window_status_bell_attr="blink,bold"
# window last status style
tmux_conf_theme_window_status_last_fg="$bg"
tmux_conf_theme_window_status_last_bg="gray"
tmux_conf_theme_window_status_last_attr="none"
# status left/right sections separators
#tmux_conf_theme_left_separator_main=""
#tmux_conf_theme_left_separator_sub="|"
#tmux_conf_theme_right_separator_main=""
#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" # you only need fonts patched with
tmux_conf_theme_right_separator_main="\uE0B2" # Powerline symbols or the standalone
tmux_conf_theme_right_separator_sub="\uE0B3" # PowerlineSymbols.otf font, see README.md
# status left/right content:
# - separate main sections with "|"
# - separate subsections with ","
# - built-in variables are:
# - #{battery_bar}
# - #{battery_hbar}
# - #{battery_percentage}
# - #{battery_status}
# - #{battery_vbar}
# - #{circled_session_name}
# - #{hostname_ssh}
# - #{hostname}
# - #{loadavg}
# - #{pairing}
# - #{prefix}
# - #{root}
# - #{synchronized}
# - #{uptime_y}
# - #{uptime_d} (modulo 365 when #{uptime_y} is used)
# - #{uptime_h}
# - #{uptime_m}
# - #{uptime_s}
# - #{username}
# - #{username_ssh}
tmux_conf_theme_status_left=" :: #S | ↑#{?uptime_y, #{uptime_y}y,}#{?uptime_d, #{uptime_d}d,}#{?uptime_h, #{uptime_h}h,}#{?uptime_m, #{uptime_m}m,} "
tmux_conf_theme_status_right="#{prefix}#{pairing}#{synchronized} #{?battery_status, #{battery_status},}#{?battery_bar, #{battery_bar},}#{?battery_percentage, #{battery_percentage},} , %R , %d %b | #{username}#{root} | #{hostname} "
# status left style
tmux_conf_theme_status_left_fg="$bg,$bg,$bg"
tmux_conf_theme_status_left_bg="$orange,$yellow,$fg4"
tmux_conf_theme_status_left_attr="bold,none,none"
# status right style
tmux_conf_theme_status_right_fg="$fg4,$bg,$bg"
tmux_conf_theme_status_right_bg="$bg1,$fg4,$brightblue"
tmux_conf_theme_status_right_attr="none,none,bold"
# pairing indicator
tmux_conf_theme_pairing="⚇" # U+2687
tmux_conf_theme_pairing_fg="none"
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_bg="none"
tmux_conf_theme_prefix_attr="none"
# root indicator
tmux_conf_theme_root="!"
tmux_conf_theme_root_fg="none"
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_bg="none"
tmux_conf_theme_synchronized_attr="none"
# battery bar symbols
tmux_conf_battery_bar_symbol_full="◼"
tmux_conf_battery_bar_symbol_empty="◻"
#tmux_conf_battery_bar_symbol_full="♥"
#tmux_conf_battery_bar_symbol_empty="·"
# battery bar length (in number of symbols), possible values are:
# - auto
# - a number, e.g. 5
tmux_conf_battery_bar_length="auto"
# battery bar palette, possible values are:
# - gradient (default)
# - heat
# - "colour_full_fg,colour_empty_fg,colour_bg"
tmux_conf_battery_bar_palette="gradient"
#tmux_conf_battery_bar_palette="#d70000,#e4e4e4,#000000" # red, white, black
# battery hbar palette, possible values are:
# - gradient (default)
# - heat
# - "colour_low,colour_half,colour_full"
tmux_conf_battery_hbar_palette="gradient"
#tmux_conf_battery_hbar_palette="#d70000,#ff5f00,#5fff00" # red, orange, green
# battery vbar palette, possible values are:
# - gradient (default)
# - heat
# - "colour_low,colour_half,colour_full"
tmux_conf_battery_vbar_palette="gradient"
#tmux_conf_battery_vbar_palette="#d70000,#ff5f00,#5fff00" # red, orange, green
# symbols used to indicate whether battery is charging or discharging
tmux_conf_battery_status_charging="↑" # U+2191
tmux_conf_battery_status_discharging="↓" # U+2193
#tmux_conf_battery_status_charging="🔌" # U+1F50C
#tmux_conf_battery_status_discharging="🔋" # U+1F50B
# clock style (when you hit <prefix> + t)
# you may want to use %I:%M %p in place of %R in tmux_conf_theme_status_right
tmux_conf_theme_clock_colour="$tmux_conf_theme_colour_4"
tmux_conf_theme_clock_style="24"
# -- clipboard -----------------------------------------------------------------
# in copy mode, copying selection also copies to the OS clipboard
# - true
# - false (default)
# on macOS, this requires installing reattach-to-user-namespace, see README.md
# on Linux, this requires xsel or xclip
tmux_conf_copy_to_os_clipboard=false
# -- user customizations -------------------------------------------------------
# this is the place to override or undo settings
# increase history size
#set -g history-limit 10000
# start with mouse mode enabled
#set -g mouse on
# force Vi mode
# really you should export VISUAL or EDITOR environment variable, see manual
#set -g status-keys vi
#set -g mode-keys vi
# replace C-b by C-a instead of using both prefixes
# set -gu prefix2
# unbind C-a
# unbind C-b
# set -g prefix C-a
# bind C-a send-prefix
# move status line to top
#set -g status-position top
# -- custom variables ----------------------------------------------------------
# to define a custom #{foo} variable, define a POSIX shell function between the
# '# EOF' and the '# "$@"' lines. Please note that the opening brace { character
# must be on the same line as the function name otherwise the parse won't detect
# it.
#
# then, use #{foo} in e.g. the 'tmux_conf_theme_status_left' or the
# 'tmux_conf_theme_status_right' variables.
# # /!\ do not remove the following line
# EOF
#
# weather() {
# curl -m 1 wttr.in?format=3 2>/dev/null
# sleep 900 # sleep for 15 minutes, throttle network requests whatever the value of status-interval
# }
#
# online() {
# ping -t 1 -c 1 1.1.1.1 >/dev/null 2>&1 && printf '✔' || printf '✘'
# }
#
# "$@"
# # /!\ do not remove the previous line
Edit: Lol, of course I see the typo as I finish the comment. Edit2: n/m, I changed it to |
Are you sure your |
Yes, everything works just fine except the last window config just stopped working. I will roll back the commits and find the one that broke it. And yeah, in your screenshot the last window should have the background |
BTW I don't recommend symlinking |
Yeah, I'd rather fix conflicts than have to manually copy and paste changes. |
I have the same issue when reverting to gh-419 and only changing the tmux_conf_theme_window_status_last_fg="$tmux_conf_theme_colour_4"
-tmux_conf_theme_window_status_last_bg="default"
+tmux_conf_theme_window_status_last_bg="$tmux_conf_theme_colour_4" |
Yeah I"m seeing last window |
I have to roll back all the way to master to get the last window styles to work again, so it must have been something in b2c9a8c |
Found the reason... I'm setting colors explicitly to make the separators display correctly. But that overrides tmux's |
Bear with me... |
Got it, please pull
And with yours
|
For the left and right part of the status bar it's possible to avoid a "black" space because I control everything For windows, I know nothing about the previous and the next window (which is current, which is the last, which has activity, ...), which means I can only reliably combine colors with the status bar background |
Okay, no problem. Just curious. Thanks for your awesome work! |
@parkerault can you please try the latest version? and if possible style
|
@gpakosz I'm up to date and everything looks good. You might have noticed those weird little artifacts in the powerline glyphs. Those are caused by cleartype antialiasing. Setting it to grayscale antialiasing looks like crap though, so I just ignore it. It's probably not something you can fix anyway. |
Yep you can use
Indeed |
Blinking must be supported and enabled in the terminal emulator. Thanks for testing. Will merge soon |
Had to make modifications to make it work with tmux |
* upstream/master: improved status line rendering, fixes gpakosz#419 made version detection more robust in case tmux executable is renamed fixed status line that doesn't work with tmux 2.4
- do not apply attr to spacers - fixed attr for last window, window with activity and window with bell
- non current windows now use separators when they're enabled - fixed style for last window, window with activity and window with bell
- do not apply attr to spacers - fixed attr for last window, window with activity and window with bell
fixed spacers
* improved status line rendering, fixes gpakosz#419 (2) - do not apply attr to spacers - fixed attr for last window, window with activity and window with bell * added support for #{hostname_full} and #{hostname_full_ssh}, closes gpakosz#361 * fixed use of invalid 'print' command * improved status line rendering, fixes gpakosz#419 (3) fixed spacers * fixed indentation in _apply_overrides() * mention 'reattach-no-usernamespace' is not needed for tmux > 2.6 * added support for tpm, resolves gpakosz#61 * fixed BusyBox's tr command compatibility, fixes gpakosz#441 * fixed variable replacement in tmux_conf_theme_status_right and tmux_conf_theme_status_left, fixes gpakosz#356 * fix left status prefix rendering * fixed variable replacement in tmux_conf_theme_status_right and tmux_conf_theme_status_left (2), fixes gpakosz#442 * fixed #{online} custom variable implementation as ping -t is not portable, fixes gpakosz#451 * remind people to not "uncomment" local functions in .tmux.conf.local * fixed copy to os clipboard on macOS when xclip or xsel is installed, fixes gpakosz#459 * worked around broken /sys/class/power_supply/<supply_name>/capacity > 100, resolves gpakosz#460 * made version detection more robust in case tmux executable is renamed (2), fixes gpakosz#457 * made version detection more robust in case tmux executable is renamed (3), fixes gpakosz#462 fixed a regression introduced by commit 8aefa1e that breaks version detection for tmux HEAD for which 'tmux -V' prints e.g. tmux next-3.3 * made _apply_bindings() work with tmux 3.2 stock bindings, fixes gpakosz#472 * replaced printf '\n' calls by echo calls, fixes gpakosz#479 TPM plugins further editing status-left or status-right may alter the content in such a way that the line feed character becomes a space * use single quotes for strings containing Unicode escapes, fixes gpakosz#486 * mitigate tmux displaying its "<... not ready>" message, closes gpakosz#496 the "flickering" perceived when the "<... not ready>" message is long won't be totally eliminated until tmux 3.3 though (commit 38c5788232e0e3abdd08ade55a9d4fbcda637df1) * revert "mitigate tmux displaying its "<... not ready>" message, closes gpakosz#496" this reverts commit 67b1d38. the proposed mitigation causes flickering for some, see followups in gpakosz#496 * check connectivity to github.com before installing and/or updating tpm and plugins, fixes gpakosz#513 * fixed _battery_info() when pmset doesn't report a charge percentage, fixes gpakosz#512 * updated tpm integration - automatically delete tpm when not used - automatically delete unused plugins - install plugins when subsequently enabling then in ~/.tmux.conf.local - use <prefix> + u to update plugins as <prefix> + U is bound to Urlview, fixes gpakosz#507 * fixed tpm plugins not installing on CentOS 7, fixes gpakosz#520 - drop git clone --shallow-submodules as it requires git >= 2.9.0 - display a message when one of the tpm script fails * worked around Falcon.app agent slowing everything down, fixes gpakosz#492 it appears the Falcon anti-malware product for end-points slows down ps -t /dev/ttysXXX commands 🤷 the workaround consists in passing ttysXXX instead of /dev/ttysXXX and is achieved by removing the /dev/ prefix in #{pane_tty} expansion with the help of formats substitutions * worked around Falcon.app agent slowing everything down (2), fixes gpakosz#522 * reworked pane / tty introspection, fixes gpakosz#403, fixes gpakosz#458 - renamed _tty_info() to _pane_info() - pass both #{pane_pid} and #{pane_tty} to _pane_info() - when inspecting ps output, walk down from #{pane_pid} to the child-most pid * made background sleep process exit immediately when exiting tmux, fixes gpakosz#509 * set default-terminal to tmux-256color when available, fixes gpakosz#205, fixes gpakosz#382, closes gpakosz#386 see https://github.com/tmux/tmux/wiki/FAQ#i-dont-see-italics-or-italics-and-reverse-are-the-wrong-way-round * check connectivity to github.com before installing and/or updating tpm and plugins (2) Co-authored-by: Gregory Pakosz <[email protected]> Co-authored-by: Frederick Zhang <[email protected]> Co-authored-by: Neil Mahoney <[email protected]> Co-authored-by: Haneol Kim <[email protected]>
- non current windows now use separators when they're enabled - fixed style for last window, window with activity and window with bell
- do not apply attr to spacers - fixed attr for last window, window with activity and window with bell
- non current windows now use separators when they're enabled - fixed style for last window, window with activity and window with bell
- do not apply attr to spacers - fixed attr for last window, window with activity and window with bell
- non current windows now use separators when they're enabled - fixed style for last window, window with activity and window with bell
- do not apply attr to spacers - fixed attr for last window, window with activity and window with bell
fixed spacers
I'm sorry to ask this question here, but I've exhausted my google-fu and I can't find an answer anywhere else. Is it possible to add the status line separators between inactive windows so I can change their background color? Setting
tmux_conf_theme_window_status_bg
to anything except the status bar background gives this result:Is it possible to set the separator so they fit snugly into the current window?
The text was updated successfully, but these errors were encountered: