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

No tabs in quick terminal #2329

Closed
lucymhdavies opened this issue Sep 30, 2024 · 11 comments
Closed

No tabs in quick terminal #2329

lucymhdavies opened this issue Sep 30, 2024 · 11 comments

Comments

@lucymhdavies
Copy link
Contributor

Known issue, mentioned in #2320

But I'm creating an issue specifically to track it

@mitchellh
Copy link
Contributor

Thanks, this is currently a "wont fix" because we have no plans to implement custom tabs. I noted it can be fixed if we do that, but there aren't any plans to actually do that, and the feature is documented as not supporting tabs currently.

@lucymhdavies
Copy link
Contributor Author

Aha! Thanks for that clarification :)

@mitchellh
Copy link
Contributor

No problem, if my stance changes I'll reopen. Your other two issues are good though!

@yasyf
Copy link

yasyf commented Dec 18, 2024

@mitchellh I know this is wontfix but just wanted to mention this is something I normally rely on in my workflow!

@mitchellh
Copy link
Contributor

Hey @yasyf its not a "wont fix" forever, its just dependent on something that is a lot of work and not quite ready to be worked on yet :)

@yasyf
Copy link

yasyf commented Dec 18, 2024

@mitchellh luckily splits get us almost all the way there for now :)

@tkafka
Copy link

tkafka commented Dec 27, 2024

Bringing a twitter conversation here:

TLDR is that I personally I'd be completely okay with hotkey window being just a regular window, maybe with some special positioning rules.

Advantages:

  • easy to add tabs

Disadvantages

  • some people might want the hotkey window to look special (no chrome, animations etc.). I don't :).

@mitchellh: tweet

On tabs our hands are tied: macOS tabs require a titlebar. And a titlebar doesn't let you move the window off screen (to animate in), plus looks wonky. We need a fully custom tab bar solution (a ton of work) to fix this. Its planned but not short term.

@tkafka:

I understand, but personally, I don't care about the animation, and I am okay with it appearing exactly as a 'regular' window. Even now my iTerm2 hotkey window has a limited width, as there is zero reason for a mile wide command line.
I understand someone else will have different priorities, I just wanted to say that personally I am okay with all the drawbacks :). Thanks for a great work!

@lucymhdavies
Copy link
Contributor Author

Even now my iTerm2 hotkey window has a limited width, as there is zero reason for a mile wide command line.

For this part at least, we have #2384 (which a couple of us have experimented with, but not got a full implementation developed yet)

#3100 is also related.

@hherman1
Copy link

hherman1 commented Dec 28, 2024

Seconding this report about user preferences. I use iterm2 exclusively as a hotkey window with tabs. I would like to use ghostty instead, but I don’t think I can switch if I can’t use tabs with my hot key window.

Since it is the only way I use my terminal, without tabs I am limited to only a single terminal window, which is a blocker for me to adopt. I would gladly sacrifice appearance controls, or any sort of visual, to be able to use ghostty.

@sohsatoh
Copy link
Contributor

sohsatoh commented Jan 1, 2025

This feature has been the biggest hurdle for me in fully replacing iTerm2 with Ghostty, so I’m currently working on implementing it.

It’s just a proof of concept for now, but the changes aren’t too significant.

If everything looks good, I’m going to submit a pull request in a few days (hopefully).

ghostty-qt-tab.mp4

@derekbunch
Copy link

in the interim, i use this hammerspoon script to show/hide a singleton window based on a keymap. Maybe it would be helpful for others trying to migrate from iTerm. I used it previously with kitty, then generalized it a bit to work with any mac bundle_id

local spaces = require("hs.spaces") -- https://github.com/asmagill/hs._asm.spaces
local ghostty_bundle_id = "com.mitchellh.ghostty" -- more accurate to avoid mismatching on browser titles

-- Switch kitty
local toggle_app = function(bundle_id)
	function GetMainWindow(app)
		-- get main window from app
		local win = nil
		while win == nil do
			win = app:mainWindow()
		end
		return win
	end

	function MoveWindow(app_to_toggle, space, mainScreen)
		-- move to main space
		local win = GetMainWindow(app_to_toggle)
		if win:isFullScreen() then
			hs.eventtap.keyStroke("fn", "f", 0, app_to_toggle)
		end
		local winFrame = win:frame()
		local scrFrame = mainScreen:fullFrame()
		winFrame.w = scrFrame.w
		winFrame.y = scrFrame.y
		winFrame.x = scrFrame.x
		win:setFrame(winFrame, 0)
		spaces.moveWindowToSpace(win, space)
		if win:isFullScreen() then
			hs.eventtap.keyStroke("fn", "f", 0, app_to_toggle)
		end
		win:focus()
	end

	local app_to_toggle = hs.application.get(bundle_id)
	if app_to_toggle ~= nil and app_to_toggle:isFrontmost() then
		app_to_toggle:hide()
	else
		local space = spaces.activeSpaceOnScreen()
		local mainScreen = hs.screen.mainScreen()
		if app_to_toggle == nil and hs.application.launchOrFocusByBundleID(bundle_id) then
			local appWatcher = nil
			appWatcher = hs.application.watcher.new(function(name, event, app)
				if event == hs.application.watcher.launched and app:bundleID() == bundle_id then
					GetMainWindow(app):move(hs.geometry({ x = 0, y = 0, w = 1, h = 0.8 })) -- move app_to_toggle window on top, you could set the window percentage here
					app:hide()
					MoveWindow(app, space, mainScreen)
					appWatcher:stop()
				end
			end)
			appWatcher:start()
		end
		if app_to_toggle ~= nil then
			MoveWindow(app_to_toggle, space, mainScreen)
		end
	end
end

-- change your own hotkey combo here, available keys could be found here:https://www.hammerspoon.org/docs/hs.hotkey.html#bind
hs.hotkey.bind({ "command" }, "`", function()
	toggle_app(ghostty_bundle_id)
end)

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

No branches or pull requests

7 participants