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

Centre segments section #2233

Closed
hrai opened this issue Mar 28, 2023 · 1 comment
Closed

Centre segments section #2233

hrai opened this issue Mar 28, 2023 · 1 comment

Comments

@hrai
Copy link

hrai commented Mar 28, 2023

Is there a way to centre the rightmost segments? It seems to include the window number and the app that's currently running in it.

image

Also, what's the name of these in built segments?

  • tmux session (0 in the screenshot above)
  • tmux window and running app (1* > zsh in the screenshot above)

My left segment doesn't specify them.

Here's my config:

{
  "segments": {
    "left": [
      {
        "function": "powerline.segments.common.vcs.branch",
        "priority": 50
      },
      {
        "function": "powerline.segments.common.env.cwd",
        "before": " "
      },
      {
        "function": "powerline.segments.common.vcs.branch"
      }
    ],
    "right": [
      {
        "function": "powerline.segments.common.time.date",
        "before": " "
      },
      {
        "function": "powerline.segments.common.time.date",
        "name": "time",
        "before": " ",
        "args": {
          "format": "%H:%M",
          "istime": true
        }
      },
      {
        "function": "powerline.segments.common.net.hostname"
      }
    ]
  }
}
@PH111P
Copy link
Member

PH111P commented May 11, 2024

Hi @hrai,

The left part of the tmux bar (the tmux session, window etc) is unfortunately baked into tmux and not really configurable, as far as I understand. Also, I would advise against using cwd-dependent segments in tmux; if I recall correctly, they don't really work as expected (don't get updated if you move to a different dir within tmux).

As for center segments; these are currently not supported here at all and require rewriting both the config parser, as well as the bindings (read: this is work). I once did something like that for the lemonbar binding, but I'm not sure if that solution is suitable for a wider roll-out (in particular, one would still need to rewrite a binding for tmux).

@PH111P PH111P closed this as not planned Won't fix, can't repro, duplicate, stale May 11, 2024
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