[BUG] Gitmux adds block in Catppuccin theme
Describe the bug A block is added after gitmux module output in status bar.
Expected behavior The block should not appear at all
Hello everyone, similar problem to issue 105, though the fixes mentioned there didn't help. From what I've gathered so far, adding characters or whitespaces as strings in the layout-section of gitmux.conf, the background is set to the "clear" color code in styles-section. So in this regard, everything works as expected.
i have to set the #[default] flag in tmux.conf however, so that following modules aren't affected by the color styles of gitmux.
set -ag status-right "#{E:@catppuccin_status_file}"
set -ag status-right "#{E:@catppuccin_status_gitmux}#[default]"
set -ag status-right "#{E:@catppuccin_status_application}"
set -ag status-right "#{E:@catppuccin_status_uptime}"
set -ag status-right "#{E:@catppuccin_status_date_time}"
This seems to be another "bug", that I already fixed myself. However, the block stays.
My theory on this: The "block" has the same color as the status bar. All other modules integrate well in the scheme. Putting gitmux to the very end of the status bar still results in a block. Could there possibly be an output of un-stialized (whitespaces)-characters, after the main output from gitmux appears?
My version of gitmux is a self compiled one for latest build (two days or so ago) tmux is version 3.4
Can you provide your gitmux.conf please?
tmux:
# The symbols section defines the symbols printed before specific elements
# of Git status displayed in tmux status string.
symbols:
# current branch name.
branch: "⎇ "
# Git SHA1 hash (in 'detached' state).
hashprefix: ":"
# 'ahead count' when local and remote branch diverged.
ahead: ↑·
# 'behind count' when local and remote branch diverged.
behind: ↓·
# count of files in the staging area.
staged: "● "
# count of files in conflicts.
conflict: "✖ "
# count of modified files.
modified: "✚ "
# count of untracked files.
untracked: "… "
# count of stash entries.
stashed: "⚑ "
# count of inserted lines (stats section).
insertions: Σ
# count of deleted lines (stats section).
deletions: Δ
# Shown when the working tree is clean.
clean: ✔
# Styles are tmux format strings used to specify text colors and attributes
# of Git status elements. See the STYLES section of tmux man page.
# https://man7.org/linux/man-pages/man1/tmux.1.html#STYLES.
styles:
clear: '#[fg=#{@thm_fg}]'
state: '#[fg=#{@thm_red},bold]'
branch: '#[fg=#{@thm_fg},bold]'
remote: '#[fg=#{@thm_teal}]'
divergence: '#[fg=#{@thm_fg}]'
staged: '#[fg=#{@thm_green},bold]'
conflict: '#[fg=#{@thm_red},bold]'
modified: '#[fg=#{@thm_yellow},bold]'
untracked: '#[fg=#{@thm_mauve},bold]'
stashed: '#[fg=#{@thm_blue},bold]'
clean: '#[fg=#{@thm_rosewater},bold]'
insertions: '#[fg=#{@thm_green}]'
deletions: '#[fg=#{@thm_red}]'
# The layout section defines what components gitmux shows and the order in
# which they appear on tmux status bar.
#
# Allowed components:
# - branch: local branch name. Examples: `⎇ main`, `⎇ :345e7a0` or `[rebase]`
# - remote-branch: remote branch name, for example: `origin/main`.
# - divergence: divergence between local and remote branch, if any. Example: `↓·2↑·1`
# - remote: alias for `remote-branch` followed by `divergence`, for example: `origin/main ↓·2↑·1`
# - flags: symbols representing the working tree state, for example `✚ 1 ⚑ 1 … 2`
# - stats: insertions/deletions (lines), for example`Σ56 Δ21`
# - some string `foo`: any other character of string is directly shown, for example `foo` or `|`
layout: [branch, remote-branch, divergence, " - ", flags]
# Additional configuration options.
options:
# Maximum displayed length for local and remote branch names.
branch_max_len: 0
# Trim left, right or from the center of the branch (`right`, `left` or `center`).
branch_trim: right
# Character indicating whether and where a branch was truncated.
ellipsis: …
# Hides the clean flag
hide_clean: true
# Swaps order of behind & ahead upstream counts - "↓·1↑·1" -> "↑·1↓·1".
swap_divergence: false
# Add a space between behind & ahead upstream counts.
divergence_space: true
The style section is a copy/paste from catppuccin after I initially changed the lines by hand, in order to overwrite possible mistakes I made. hide_clean and divergance_space were changed in my attempts to fix the issue
If you run gitmux -cfg $HOME/.gitmux.conf on the command line, you will see a red block at the end of the command, and I think that is what is causing the black box in the setup.
If you run
gitmux -cfg $HOME/.gitmux.confon the command line, you will see a red block at the end of the command, and I think that is what is causing the black box in the setup.![]()
That's interesting.
I'm not using catpuccin, can you share the .gitmux.conf you're using please?
tmux:
# The symbols section defines the symbols printed before specific elements
# of Git status displayed in tmux status string.
symbols:
branch: " " # "⎇ " # current branch name.
hashprefix: ":" # Git SHA1 hash (in 'detached' state).
ahead: " " # "↑" # 'ahead count' when local and remote branch diverged.
behind: " " # "↓" # 'behind count' when local and remote branch diverged.
staged: " " # "● " # count of files in the staging area.
conflict: " " # "✖ " # count of files in conflicts.
modified: " " # "✚ " # count of modified files.
untracked: " " # "… " # count of untracked files.
stashed: " " # "⚑ " # count of stash entries.
clean: " " # Shown when the working tree is clean.
insertions: "Σ" # count of inserted lines (stats section).
deletions: "Δ" # count of deleted lines (stats section).
# Styles are tmux format strings used to specify text colors and attributes
# of Git status elements. See the STYLES section of tmux man page.
# https://man7.org/linux/man-pages/man1/tmux.1.html#STYLES.
styles:
clear: '#[fg=#{@thm_fg}]'
state: '#[fg=#{@thm_red},bold]'
branch: '#[fg=#{@thm_fg},bold]'
remote: '#[fg=#{@thm_teal}]'
divergence: '#[fg=#{@thm_fg}]'
staged: '#[fg=#{@thm_green},bold]'
conflict: '#[fg=#{@thm_red},bold]'
modified: '#[fg=#{@thm_yellow},bold]'
untracked: '#[fg=#{@thm_mauve},bold]'
stashed: '#[fg=#{@thm_blue},bold]'
clean: '#[fg=#{@thm_rosewater},bold]'
insertions: '#[fg=#{@thm_green}]'
deletions: '#[fg=#{@thm_red}]'
# The layout section defines what components gitmux shows and the order in
# which they appear on tmux status bar.
#
# Allowed components:
# - branch: local branch name. Examples: `⎇ main`, `⎇ :345e7a0` or `[rebase]`
# - remote-branch: remote branch name, for example: `origin/main`.
# - divergence: divergence between local and remote branch, if any. Example: `↓·2↑·1`
# - remote: alias for `remote-branch` followed by `divergence`, for example: `origin/main ↓·2↑·1`
# - flags: symbols representing the working tree state, for example `✚ 1 ⚑ 1 … 2`
# - stats: insertions/deletions (lines), for example`Σ56 Δ21`
# - some string `foo`: any other character of string is directly shown, for example `foo` or `|`
layout: [branch, remote, " ", flags]
# Additional configuration options.
options:
# Maximum displayed length for local and remote branch names.
branch_max_len: 0
# Trim left, right or from the center of the branch (`right`, `left` or `center`).
branch_trim: right
# Character indicating whether and where a branch was truncated.
ellipsis: …
# Hides the clean flag
hide_clean: true
# Swaps order of behind & ahead upstream counts - "↓·1↑·1" -> "↑·1↓·1".
swap_divergence: false
# Add a space between behind & ahead upstream counts.
divergence_space: true
One thing I noticed is that there is a bock in the end that resets fg and bg to default. #[fg=default,bg=default], could this be the issue in this? Since the bg, I think, is not default in the Catppuccin theme block in the status modules.
I think the issue might be in Catppuccin actually. There is a block in status_module.conf which sets the end of the status module separator, and it seems to reset the fg to the module bg color of the module and not the bg to the module bg color. When I changed this it worked for me.
So it seems that since Gitmux resets the bg to default and Catppuccin is not setting bg back to its module color for the end separator in a module (since it is changing fg color instead) the combination of Gitmux and Catppuccin is causing this issue.
If you run
gitmux -cfg $HOME/.gitmux.confon the command line, you will see a red block at the end of the command, and I think that is what is causing the black box in the setup.![]()
That's interesting. I'm not using catpuccin, can you share the
.gitmux.confyou're using please?
@onaforeignshore now that I think of it, the output you shared shows the literal tmux format string, without rendering it through tmux, that's the point of the dbg option.
The fact that the trailing block shows red here could mean that it's not a tmux issue, and that's just how the glyph renders on the terminal. You know like if you write a smiling emoji which is yellow.
Does one of your configured symbols for git flags in gitmux render as a red block on your terminal?
Could you please share a screenshot, and not just copy-paste, of how your gitmux.conf renders in your terminal?
ping @onaforeignshore
@arl I have made lots of changes since reporting this, including making my terminal transparent (including the tmux statusline), and I don't have this issue anymore.
Ok, thanks @onaforeignshore
I'm still gonna leave this open in case OP or others have similar problems and want to add some additional context.
I still believe there's some misconfiguration going on, something to dig into between catpuccin (which I don't use) and gitmux, since that red block should not have been there.
I'm having the same issue with empty space. It looks bad on folders with no git initialized
Running gitmux -cfg $HOME/.gitmux.conf command line gives the following picture (with strange percent sign at the end):
@sAs59 this issue is about a red background block, your problem is a bit different.
Can I ask you to please open a different issue, and sharing your gitmux.conf
I'll have a look.