Skip to content

[BUG] Empty block at end of status line #140

@sAs59

Description

@sAs59

Describe the bug
When using the catppuccin theme with gitmux, an empty block shows up at the end of the status bar. Moreover, the status bar remains visible even in directories that aren’t git repositories.

To Reproduce
Use catppuccin theme with the config below. More on using gitmux with catppuccin

set -g status-right-length 100
set -g status-left-length 100
set -g status-left ""
set -g status-right "#{E:@catppuccin_status_directory}"
set -ag status-right "#{E:@catppuccin_status_gitmux}"
set -ag status-right "#{E:@catppuccin_status_session}"

Expected behavior
No empty block at end of the gitmux status line

Screenshots
Image

Image

Environment:

  • gitmux version: 0.11.5
  • tmux version: 3.5a
  • OS: 15.6.1
  • shell zsh
  • gitmux config
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}]"
        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]
    layout: [branch, divergence]

    # 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: center
        # 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: false
        # Show flags symbols without counts.
        flags_without_count: false

The issue #123 is more likely the same as I described here

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions