mirror of
https://github.com/o0th/tmux-nova.git
synced 2026-09-10 07:16:28 -04:00
Make command prompt overlaps the status bar well on tmux 3.7+ (#41)
* fix: make message command background work with tmux 3.7+ * docs(README): add missing contributors and use resilient gh links * fix: revert link to user id
This commit is contained in:
parent
317c812c34
commit
7cc65825ae
2
.github/readme.md
vendored
2
.github/readme.md
vendored
|
|
@ -119,4 +119,4 @@ set -g status-right-length 100
|
|||
|
||||
## Contributors
|
||||
|
||||
[<img alt="goolmoos" src="https://avatars.githubusercontent.com/u/49814019?v=4&s=117" width="117">](https://github.com/goolmoos)[<img alt="fky2015" src="https://avatars.githubusercontent.com/u/16451516?v=4&s=117" width="117">](https://github.com/fky2015)[<img alt="ofirgall" src="https://avatars.githubusercontent.com/u/4954051?v=4&s=117" width="117">](https://github.com/ofirgall)[<img alt="codepeon" src="https://avatars.githubusercontent.com/u/32979574?v=4&s=117" width="117">](https://github.com/codepeon)
|
||||
[<img alt="goolmoos" src="https://avatars.githubusercontent.com/u/49814019" width="117">](https://github.com/goolmoos)[<img alt="fky2015" src="https://avatars.githubusercontent.com/u/16451516" width="117">](https://github.com/fky2015)[<img alt="ofirgall" src="https://avatars.githubusercontent.com/u/4954051" width="117">](https://github.com/ofirgall)[<img alt="codepeon" src="https://avatars.githubusercontent.com/u/32979574" width="117">](https://github.com/codepeon)[<img alt="quiquecmtt" src="https://avatars.githubusercontent.com/u/44720459" width="117">](https://github.com/quiquecmtt)[<img alt="pabroux" src="https://avatars.githubusercontent.com/u/72023070" width="117">](https://github.com/pabroux)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
export LC_ALL=en_US.UTF-8
|
||||
|
||||
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
current_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
source $current_dir/utils.sh
|
||||
|
||||
#
|
||||
|
|
@ -45,11 +45,11 @@ tmux set-option -g interval $interval
|
|||
|
||||
message_command_style_bg=$(get_option "@nova-message-command-style-bg" "#44475a")
|
||||
message_command_style_fg=$(get_option "@nova-message-command-style-fg" "#f8f8f2")
|
||||
tmux set-option -g message-command-style "bg=$message_command_style_bg,fg=$message_command_style_fg"
|
||||
tmux set-option -g message-command-style "bg=$message_command_style_bg,fg=$message_command_style_fg,fill=$message_command_style_bg"
|
||||
|
||||
message_style_bg=$(get_option "@nova-message-style-bg" "#282a36")
|
||||
message_style_fg=$(get_option "@nova-message-style-fg" "#f8f8f2")
|
||||
tmux set-option -g message-style "bg=$message_style_bg,fg=$message_style_fg"
|
||||
tmux set-option -g message-style "bg=$message_style_bg,fg=$message_style_fg,fill=$message_style_bg"
|
||||
|
||||
mode_style_bg=$(get_option "@nova-mode-style-bg" "#44475a")
|
||||
mode_style_fg=$(get_option "@nova-mode-style-fg" "#f8f8f2")
|
||||
|
|
@ -80,7 +80,7 @@ tmux set-option -g pane-active-border-style "fg=${pane_active_border_style}"
|
|||
#
|
||||
|
||||
segments_left=$(get_option "@nova-segments-0-left" "")
|
||||
IFS=' ' read -r -a segments_left <<< $segments_left
|
||||
IFS=' ' read -r -a segments_left <<<$segments_left
|
||||
|
||||
tmux set-option -g status-left ""
|
||||
|
||||
|
|
@ -89,7 +89,7 @@ first_left_nerdfont=$(get_option "@nova-nerdfonts-first" "")
|
|||
for segment in "${segments_left[@]}"; do
|
||||
segment_content=$(get_option "@nova-segment-$segment" "mode")
|
||||
segment_colors=$(get_option "@nova-segment-$segment-colors" "#282a36 #f8f8f2")
|
||||
IFS=' ' read -r -a segment_colors <<< $segment_colors
|
||||
IFS=' ' read -r -a segment_colors <<<$segment_colors
|
||||
if [ "$segment_content" != "" ]; then
|
||||
# condition everything on the non emptiness of the evaluated segment
|
||||
tmux set-option -ga status-left "#{?#{w:#{E:@nova-segment-$segment}},"
|
||||
|
|
@ -174,17 +174,17 @@ fi
|
|||
#
|
||||
|
||||
segments_right=$(get_option "@nova-segments-0-right" "")
|
||||
IFS=' ' read -r -a segments_right <<< $segments_right
|
||||
IFS=' ' read -r -a segments_right <<<$segments_right
|
||||
|
||||
last_right_nerdfont=$(get_option "@nova-nerdfonts-last" "")
|
||||
last_segment=${segments_right[${#segments_right[@]}-1]}
|
||||
last_segment=${segments_right[${#segments_right[@]} - 1]}
|
||||
|
||||
tmux set-option -g status-right ""
|
||||
|
||||
for segment in "${segments_right[@]}"; do
|
||||
segment_content=$(get_option "@nova-segment-$segment" "")
|
||||
segment_colors=$(get_option "@nova-segment-$segment-colors" "#282a36 #f8f8f2")
|
||||
IFS=' ' read -r -a segment_colors <<< $segment_colors
|
||||
IFS=' ' read -r -a segment_colors <<<$segment_colors
|
||||
if [ "$segment_content" != "" ] && [ "$segment_colors" != "" ]; then
|
||||
if [ $nerdfonts = true ] && [ ! -n "$(tmux show-option -gqv status-right)" ]; then
|
||||
tmux set-option -ga status-right "#[bg=#${status_style_bg}]"
|
||||
|
|
@ -216,7 +216,7 @@ for segment in "${segments_right[@]}"; do
|
|||
fi
|
||||
done
|
||||
|
||||
for ((row=1; row <= rows; row++)); do
|
||||
for ((row = 1; row <= rows; row++)); do
|
||||
|
||||
#
|
||||
# segments-n-left
|
||||
|
|
@ -224,7 +224,7 @@ for ((row=1; row <= rows; row++)); do
|
|||
|
||||
status_style_double_bg=$(get_option "@nova-status-style-double-bg" "#282a36")
|
||||
segments_bottom_left=$(get_option "@nova-segments-$row-left" "")
|
||||
IFS=' ' read -r -a segments_bottom_left <<< $segments_bottom_left
|
||||
IFS=' ' read -r -a segments_bottom_left <<<$segments_bottom_left
|
||||
|
||||
tmux set-option -g status-format[$row] "#[fill=$status_style_double_bg]#[align=left]"
|
||||
nerdfonts_color="$status_style_double_bg"
|
||||
|
|
@ -232,7 +232,7 @@ for ((row=1; row <= rows; row++)); do
|
|||
for segment in "${segments_bottom_left[@]}"; do
|
||||
segment_content=$(get_option "@nova-segment-$segment" "")
|
||||
segment_colors=$(get_option "@nova-segment-$segment-colors" "#282a36 #f8f8f2")
|
||||
IFS=' ' read -r -a segment_colors <<< $segment_colors
|
||||
IFS=' ' read -r -a segment_colors <<<$segment_colors
|
||||
if [ "$segment_content" != "" ]; then
|
||||
if [ $nerdfonts = true ] && [[ "$(tmux show-option -gqv status-format[$row])" != *"#[align=left]" ]]; then
|
||||
tmux set-option -ga status-format[$row] "#[fg=${nerdfonts_color},bg=#${segment_colors[0]}]"
|
||||
|
|
@ -260,14 +260,14 @@ for ((row=1; row <= rows; row++)); do
|
|||
nerdfonts_color="$status_style_double_bg"
|
||||
|
||||
segments_bottom_center=$(get_option "@nova-segments-$row-center" "")
|
||||
IFS=' ' read -r -a segments_bottom_center <<< $segments_bottom_center
|
||||
IFS=' ' read -r -a segments_bottom_center <<<$segments_bottom_center
|
||||
|
||||
tmux set-option -ga status-format[$row] "#[align=centre]"
|
||||
|
||||
for segment in "${segments_bottom_center[@]}"; do
|
||||
segment_content=$(get_option "@nova-segment-$segment")
|
||||
segment_colors=$(get_option "@nova-segment-$segment-colors" "#282a36 #f8f8f2")
|
||||
IFS=' ' read -r -a segment_colors <<< $segment_colors
|
||||
IFS=' ' read -r -a segment_colors <<<$segment_colors
|
||||
|
||||
if [ "$segment_content" != "" ]; then
|
||||
if [ $nerdfonts = true ]; then
|
||||
|
|
@ -294,14 +294,14 @@ for ((row=1; row <= rows; row++)); do
|
|||
nerdfonts_color="$status_style_double_bg"
|
||||
|
||||
segments_bottom_right=$(get_option "@nova-segments-$row-right" "")
|
||||
IFS=' ' read -r -a segments_bottom_right <<< $segments_bottom_right
|
||||
IFS=' ' read -r -a segments_bottom_right <<<$segments_bottom_right
|
||||
|
||||
tmux set-option -ga status-format[$row] "#[align=right]"
|
||||
|
||||
for segment in "${segments_bottom_right[@]}"; do
|
||||
segment_content=$(get_option "@nova-segment-$segment")
|
||||
segment_colors=$(get_option "@nova-segment-$segment-colors" "#282a36 #f8f8f2")
|
||||
IFS=' ' read -r -a segment_colors <<< $segment_colors
|
||||
IFS=' ' read -r -a segment_colors <<<$segment_colors
|
||||
|
||||
if [ "$segment_content" != "" ]; then
|
||||
if [ $nerdfonts = true ]; then
|
||||
|
|
|
|||
Loading…
Reference in a new issue