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

Can't rename tabs #47

Closed
thomascrha opened this issue Dec 7, 2024 · 6 comments · Fixed by #53
Closed

Can't rename tabs #47

thomascrha opened this issue Dec 7, 2024 · 6 comments · Fixed by #53

Comments

@thomascrha
Copy link

thomascrha commented Dec 7, 2024

Hi there - I have configured this key binding

  {
    key = ',',
    mods = 'LEADER',
    action = act.PromptInputLine {
      description = 'Enter new name for tab',
      -- initial_value = 'My Tab Name',
      action = wezterm.action_callback(function(window, pane, line)
        -- line will be `nil` if they hit escape without entering anything
        -- An empty string if they just hit enter
        -- Or the actual line of text they wrote
        if line then
          window:active_tab():set_title(line)
        end
      end),
    },
  },

Taken from the official docs here example-of-interactively-renaming-the-current-tab

But when i rename the tab tabline doesn't adhere to the rename. If i disable the plugin (or even use something like bar.wezterm it works as expected.

Also this is my current config - pretty much stock

local tabline = wezterm.plugin.require("https://github.com/michaelbrusegard/tabline.wez")
tabline.setup({
  options = { theme = 'OneHalfDark' }
})
tabline.apply_to_config(config)

I'm thinking this can be changed somehow in the configuration - but I couldn't figure it out - I'm probably just missing it/dumb.

@michaelbrusegard
Copy link
Owner

hmm, this plugin does overwrite the name so that makes sense. You could probably pass a variable to be displayed in the tabline and then change that variable in the keybind action? But I am not sure to be honest

@thomascrha
Copy link
Author

Would it be possible to expose a config var for the tabs section that doesn't rename the tab ? It seems kinda difficult - you have alot of custom logic and features around detecting whats happening inside the tab and exposing it by then renaming the tab - it might be that this isn't the plugin for me - as i actually get the feature - i just don't want it. I'll take a look and see what i can make of it - but lua experience is pretty minimal.

@erlestor
Copy link

erlestor commented Dec 9, 2024

I would love this. I also want to turn off tabs showing the cwd when active. I like my tabs to stay the same length all the time

@michaelbrusegard
Copy link
Owner

I would love this. I also want to turn off tabs showing the cwd when active. I like my tabs to stay the same length all the time

That is 100% doable by customizing the tab_active in the config options

@michaelbrusegard
Copy link
Owner

Would it be possible to expose a config var for the tabs section that doesn't rename the tab ? It seems kinda difficult - you have alot of custom logic and features around detecting whats happening inside the tab and exposing it by then renaming the tab - it might be that this isn't the plugin for me - as i actually get the feature - i just don't want it. I'll take a look and see what i can make of it - but lua experience is pretty minimal.

Do you want a config option to disable the tab customization functionality specifically? That is very doable and I can add that if I understand you correctly

@thomascrha
Copy link
Author

Thank You !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants