Skip to content
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

Closed
parkerault opened this issue Oct 17, 2020 · 40 comments
Closed

Status line separators on windows? #419

parkerault opened this issue Oct 17, 2020 · 40 comments

Comments

@parkerault
Copy link

parkerault commented Oct 17, 2020

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:

image

Is it possible to set the separator so they fit snugly into the current window?

@gpakosz
Copy link
Owner

gpakosz commented Oct 17, 2020

Hey @parkerault 👋

Can you please give the gh-419 branch a try?

image

@parkerault
Copy link
Author

parkerault commented Oct 17, 2020

This looks like it will solve a lot of my problems. Is it possible to create custom variables for arbitrary colors?

fg0() {
  printf '#fbf1c7'
}

# then
tmux_conf_theme_pane_border='#{fg0}'

Or do those only work in the status line strings?

Edit: Or can I just use the same variable syntax as the theme colors?

fg0="#fbf1c7"
tmux_conf_theme_pane_border="$fg0"

@parkerault
Copy link
Author

It's awesome, I totally love it! Thanks for the quick reply.

image

@gpakosz
Copy link
Owner

gpakosz commented Oct 18, 2020

Edit: Or can I just use the same variable syntax as the theme colors?

Yep see the latest .tmux.conf.local sample that comes with the up to date master branch

@gpakosz
Copy link
Owner

gpakosz commented Oct 18, 2020

I pushed more to the gh-419 branch.

I gave back control of spacing/padding to the user. Now the default values for tmux_conf_theme_window_status_format and tmux_conf_theme_window_status_current_format are:

tmux_conf_theme_window_status_format=" #I #W "
tmux_conf_theme_window_status_current_format=" #I #W "

Pay attention to the padding spaces

@gpakosz
Copy link
Owner

gpakosz commented Oct 18, 2020

Wait not sure I'll keep that as it's backward compatible

@gpakosz
Copy link
Owner

gpakosz commented Oct 18, 2020

Hey @parkerault 👋

I just force pushed the gh-419 branch, can you please give it a try?

$ cd ~/.tmux
$ git fetch -p
$ git checkout gh-419
$ # make sure you didn't modify .tmux.conf nor the sample .tmux.conf.local files
$ git reset --hard origin/gh-419`

@parkerault
Copy link
Author

parkerault commented Oct 18, 2020

@gpakosz I tried it, but it seems to have broken somewhere between a43ac95 and HEAD. I turned on logging, and all I did was start a session and exit it immediately, but the server log is MASSIVE so it's difficult to know what to look for. The status bar looks like this:

image

tmux-client.log

tmux-server.log

@gpakosz
Copy link
Owner

gpakosz commented Oct 18, 2020

I pushed another commit

@gpakosz
Copy link
Owner

gpakosz commented Oct 18, 2020

What OS and shell are you using BTW?

@parkerault
Copy link
Author

parkerault commented Oct 18, 2020

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).

image

@gpakosz
Copy link
Owner

gpakosz commented Oct 18, 2020

I'll polish branch gh-419 and merge it.

As far as I can tell, separators now render nicely with status line background color.

@parkerault
Copy link
Author

parkerault commented Oct 18, 2020

Smashing! Thank you so much for being so responsive. I'm sure you didn't expect it to be this much trouble.

image

Unfortunately it looks like the tmux_conf_theme_window_status_last_* variables no longer have any effect (in the above screenshot window 3 should be have a brighter background than window 1), and the separators are behaving strangely:

image

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"

@gpakosz
Copy link
Owner

gpakosz commented Oct 18, 2020

I changed nothing about tmux_conf_theme_window_status_last_* 🤷‍♂️

Are you sure resetting the gh-419 branch went well?

@gpakosz
Copy link
Owner

gpakosz commented Oct 18, 2020

Also can you please give me your ~/.tmux.conf.local copy in its entirety?

@parkerault
Copy link
Author

parkerault commented Oct 18, 2020

Yeah, I'm up to date on gh-419.

Git log:
commit 5f6f5410bb0d9a1d2188c5bf03a54347711f609d (HEAD -> customized, gh-419)
Author: Parker Ault <[email protected]>
Date:   Sun Oct 18 13:46:22 2020 -0500

    Use custom variables for color names.

commit ce61dc6afd6a4438ab2601ca723cd90fdfa8940c (origin/gh-419)
Author: Gregory Pakosz <[email protected]>
Date:   Sun Oct 18 21:32:02 2020 +0200

    fixup! improved status line separator rendering

commit 7c156eea9087163385f9a3b49e1938d02cc8e79e
Author: Gregory Pakosz <[email protected]>
Date:   Sun Oct 18 20:42:44 2020 +0200

    fixup! improved status line separator rendering

commit 76a9433268d7276e3c4708797e6142600ebe72db
Author: Gregory Pakosz <[email protected]>
Date:   Sun Oct 18 19:58:34 2020 +0200

    fixup! improved status line separator rendering

commit 7597e0bf2d1ad2154a22d10c9ca6e7bb147ebe51
Author: Gregory Pakosz <[email protected]>
Date:   Sun Oct 18 17:36:26 2020 +0200

    fixup! improved status line separator rendering

commit b2c9a8c4734159e2cb5b36202a84d8c78e0d3076
Author: Gregory Pakosz <[email protected]>
Date:   Sat Oct 17 22:23:48 2020 +0200

    improved status line separator rendering

commit a43ac95e5f88122d81a341038f8b70d712fb420f (origin/master, origin/HEAD)
Author: Gregory Pakosz <[email protected]>
Date:   Fri Oct 16 10:59:23 2020 +0200

    fixed status line that doesn't work with tmux 2.3, fixes #418
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

tmux_conf_theme_window_status_last_bg="gray" should be a lighter background color than tmux_conf_theme_window_status_bg="$bg4"

Edit: Lol, of course I see the typo as I finish the comment.

Edit2: n/m, I changed it to $gray and it still doesn't change the last window.

@gpakosz
Copy link
Owner

gpakosz commented Oct 18, 2020

Here is how it looks here

image

@gpakosz
Copy link
Owner

gpakosz commented Oct 18, 2020

Are you sure your ~/.tmux.conf is still a symlink?

@parkerault
Copy link
Author

parkerault commented Oct 18, 2020

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.

image

And yeah, in your screenshot the last window should have the background gray="#928374" but it is showing the same background as the default window status bg4="#7c6f64"

@gpakosz
Copy link
Owner

gpakosz commented Oct 18, 2020

BTW I don't recommend symlinking ~/.tmux.conf.local as having your own ~/.tmux.conf.local copy lets you pull Oh My Tmux! without risking merge conflicts

@parkerault
Copy link
Author

Yeah, I'd rather fix conflicts than have to manually copy and paste changes.

@parkerault
Copy link
Author

I have the same issue when reverting to gh-419 and only changing the tmux_conf_theme_window_status_last_bg value.

image

 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"

@gpakosz
Copy link
Owner

gpakosz commented Oct 18, 2020

Yeah I"m seeing last window fg doesn't turn to blue...
Not sure why yet

@parkerault
Copy link
Author

parkerault commented Oct 18, 2020

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

@gpakosz
Copy link
Owner

gpakosz commented Oct 18, 2020

Found the reason... I'm setting colors explicitly to make the separators display correctly. But that overrides tmux's window-status-last-style option

@gpakosz
Copy link
Owner

gpakosz commented Oct 18, 2020

Bear with me...

@gpakosz
Copy link
Owner

gpakosz commented Oct 18, 2020

Got it, please pull gh-419 to commit 343702d918b34af4c8ac7b1c41abee765f243161

# window last status style
tmux_conf_theme_window_status_last_fg="$tmux_conf_theme_colour_1"
tmux_conf_theme_window_status_last_bg="$tmux_conf_theme_colour_11"
tmux_conf_theme_window_status_last_attr="none"

image

And with yours

# window last status style
tmux_conf_theme_window_status_last_fg="$bg"
tmux_conf_theme_window_status_last_bg="$bg2"
tmux_conf_theme_window_status_last_attr="none"

image

@gpakosz
Copy link
Owner

gpakosz commented Oct 19, 2020

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

@parkerault
Copy link
Author

Okay, no problem. Just curious. Thanks for your awesome work!

@gpakosz
Copy link
Owner

gpakosz commented Oct 20, 2020

Things are coming along nicely.

I made window last, window activity and window bell styles work.

tmux

@gpakosz
Copy link
Owner

gpakosz commented Oct 21, 2020

@parkerault can you please try the latest version? and if possible style

  • tmux_conf_theme_window_status_last_*
  • tmux_conf_theme_window_status_bell_*
  • tmux_conf_theme_window_status_activity_*

@parkerault
Copy link
Author

parkerault commented Oct 23, 2020

@gpakosz I'm up to date and everything looks good. tmux_conf_theme_window_status_activity_* works, but I don't know how to simulate a bell in a background window. Any help?

image

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.

@gpakosz
Copy link
Owner

gpakosz commented Oct 24, 2020

but I don't know how to simulate a bell in a background window. Any help?

Yep you can use printf '\a' to produce a bell. Open a new window and e.g. launch

$ while :; do echo 'zing'; sleep 1; printf '\a'; sleep 1; done

It's probably not something you can fix anyway

Indeed

@parkerault
Copy link
Author

parkerault commented Oct 25, 2020

Sorry for the delay. Everything seems to be in order. The blink status doesn't seem to have any effect, but that seems like a minor concern and unrelated to this issue.

image

Thanks again! Superb work.

@gpakosz
Copy link
Owner

gpakosz commented Oct 26, 2020

The blink status doesn't seem to have any effect, but that seems like a minor concern and unrelated to this issue

Blinking must be supported and enabled in the terminal emulator.

Thanks for testing. Will merge soon

@gpakosz
Copy link
Owner

gpakosz commented Oct 28, 2020

Had to make modifications to make it work with tmux 2.3 to 2.7. Can you please test latest version still works for you?

tunght13488 added a commit to tunght13488/.tmux that referenced this issue Nov 4, 2020
* 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
gpakosz added a commit that referenced this issue Dec 5, 2020
- do not apply attr to spacers
- fixed attr for last window, window with activity and window with bell
gpakosz added a commit that referenced this issue Dec 12, 2020
madhukar93 pushed a commit to madhukar93/.tmux that referenced this issue Apr 25, 2021
- non current windows now use separators when they're enabled
- fixed style for last window, window with activity and window with bell
madhukar93 pushed a commit to madhukar93/.tmux that referenced this issue Apr 25, 2021
- do not apply attr to spacers
- fixed attr for last window, window with activity and window with bell
madhukar93 pushed a commit to madhukar93/.tmux that referenced this issue Apr 25, 2021
ulken94 added a commit to ulken94/.tmux that referenced this issue Oct 28, 2021
* 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]>
yerstd pushed a commit to cgxxv/tmuxc that referenced this issue Nov 18, 2021
- non current windows now use separators when they're enabled
- fixed style for last window, window with activity and window with bell
yerstd pushed a commit to cgxxv/tmuxc that referenced this issue Nov 18, 2021
- do not apply attr to spacers
- fixed attr for last window, window with activity and window with bell
yerstd pushed a commit to cgxxv/tmuxc that referenced this issue Nov 18, 2021
yerstd pushed a commit to cgxxv/tmuxc that referenced this issue Dec 9, 2021
- non current windows now use separators when they're enabled
- fixed style for last window, window with activity and window with bell
yerstd pushed a commit to cgxxv/tmuxc that referenced this issue Dec 9, 2021
- do not apply attr to spacers
- fixed attr for last window, window with activity and window with bell
yerstd pushed a commit to cgxxv/tmuxc that referenced this issue Dec 9, 2021
farhadkarimi pushed a commit to farhadkarimi/.tmux that referenced this issue Aug 18, 2023
- non current windows now use separators when they're enabled
- fixed style for last window, window with activity and window with bell
farhadkarimi pushed a commit to farhadkarimi/.tmux that referenced this issue Aug 18, 2023
- do not apply attr to spacers
- fixed attr for last window, window with activity and window with bell
farhadkarimi pushed a commit to farhadkarimi/.tmux that referenced this issue Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants