Would you consider adding a dropdown feature to this awesome terminal emulator?
I'd have to look at it in more detail, I'm not sure how well that would work with the way things are setup right now. in terms of the drag and drop features, GTKApplication, etc. I'm happy to leave this open though and see how many others are interested in this feature.
For what it's worth, I could add terminix support to tdrop (it would probably already work with tdrop if it used -e instead of -x).
noctuid I have no objection to that
It works with terminix now, but it seems that the -x flag fails if there is another terminix window open.
Terminix uses GTKApplication, as a result there is only ever one terminix process. If you run tdrop against Terminix first, does everything work fine after that? i.e. You can create new Terminix windows either through the shell or the app menu that are outside of tdrop?
Yes, you can still create new terminix windows that tdrop doesn't touch. What I meant is that if the terminix process is already running, the -x command will not execute properly. Tdrop currently requires the -x flag when first opening a terminal window, so tdrop will only work correctly if it is used to create the first terminix window before the terminix process is running.
The approach taken by Terminator works for me, just add a keyboard shortcut to hide/reveal the terminal.
Terminix's -x is now only used with tdrop's --session option (which terminix users probably wouldn't want to use), so there shouldn't be any problems for anyone who wants to use tdrop (without --session).
That's great, thanks for doing this.
It would be great if the look / feel of how this feature followed what was done with https://github.com/zzrough/gs-extensions-drop-down-terminal
IMO guakes ui while functional is ugly with the gnome-3 changes.
Besides adding a keyboard shortcut to hide/unhide the window, which should be trivial, it would also require the following GTK+ hints (all shoud be easy to implement too): skip the taskbar, hide window decorations, show in all desktops.
I'm not sure this is feasible on Wayland, primarily because there doesn't seem to be anyway to register a global hotkey. Looking at Guake, Tilda, etc they all seem to rely on XGrabKeys or the keybinder library which in turn is relying on XGrabKeys. You can see this bug report here for tilda:
All I want is a command-line switch --switch-to-existing-window that I could use when wiring up keyboard shortcuts, xfce's preferred applications, etc.
Shortcut to switch to existing terminal without cluttering the desktop is 90% of what drop-down does. Full quake-style terminal is tricky. I haven't used many, just xfce's drop-down mode. I hate that alt+tab works differently, I can't resize or move it, etc.
Also, I'd prefer the command-line switch to a built-in application shortcut. It's much more flexible (at least, in xfce).
@almson Please open a new issue for that and I'd be happy to look at it.
@gnunn1 Ok. But my comment follows the flow of the current discussion. I edited it a little for clarity.
@almson I might be confused, but what you are asking for doesn't seem related to the Quake mode in the sense it can be implemented outside that scope right?
@almson Is the functionality you suggesting just activating terminix as in xdotool search --class terminix windowactivate or xdotool search --class terminix windowraise. Alternatively, moving a window to the current desktop (instead of moving to the desktop where that window is) is pretty simple as well if you don't mind using xdotool.
Quake mode suppose you have only 1 window, so enabling it should clearly block multiple windows feature.
It would indeed be a really nice feature to have.
At the moment it's the only thing stopping me from using terminix as my main terminal emulator.
@N3mesis98 I do not have any plans to spend time on implementing this myself but I would be happy to accept a PR if someone else wants to make the effort and does a really good job of it. My main issues with spending time on this are as follows:
It won't work in Wayland as far as I can tell since there is no way in Wayland to capture keys globally
Guake seems to work pretty well on Gnome 3.20 + Wayland, at least for the global shortcut part.
Maybe it's linked to the fact that guake uses the keybinder library ?
Wayland + Gnome Extension Drop Down Termial = no problem
@N3mesis98 Judging by this bug report it only works under xwayland, otherwise you have to manually register a hot key with Gnome.
@Kami-no The extension works because it runs within the gnome desktop, Terminix does not.
As an alternative, I wrote a small bash script that use xdotool and that mimics the behavior of the Terminator "Toggle window visibility" option.
Just add a keyboard shortcut that launch the script with this command "bash [path]/terminix_hide.sh".
Works great on ArchLinux with GNOME 3.20.
https://github.com/michaudg/terminix_hide/blob/master/terminix_hide.sh
It's been a long time but I finally added support for a quake mode. To use this, you need to configure a hotkey in gnome shell (or the DE of your choice) to run terminix with the --quake switch, i.e.
terminix --quake
If a quake window is already running this will toggle the visibility of the window, if not it will create a new window.
Under Wayland there is a limitation that there is no option to have the terminal on anything other then the primary monitor. This is because Wayland doesn't let you programatically move a window between monitors.
I'm sure folks will find some bugs as they test it, feel free to open new bug reports for any problems you find or suggestions to improve it.
Great work! Thank you very much.
Wiki page added here: https://github.com/gnunn1/terminix/wiki/Quake-Mode
Awesome, I can ditch Guake now.
One minor thing, in Ubuntu I have a Terminix icon in the sidebar. I've configured a hotkey to run terminix --quake and pressing that causes the icon to do the attention wiggle/wake up dance. I don't know if it's possible to mark the window while in Quake mode as something that shouldn't be marked as running.
Actually, to expand on the previous comment. The wiggle only happens when another window was previously focused (Firefox for example). The worse problem is that when Terminix opens, it doesn't have focus. So, steps to reproduce (at least on Ubuntu):
terminix --quakeHowever, if you give focus to Terminix once it is displayed it does have focus with repeated presses of the hotkey until you click into another window.
If you look at line 995 in app window.d, you can change the GdkWindowTypeHint from NORMAL to UTILITY and that may solve the wiggle issue. However the issue I had with it is that I can't get it to focus the window programmatically other then by clicking it manually.
It's a shame because UTILITY has a number of advantages on Gnome Shell such as not appearing in the overview or alt-tab screens.
Unfortunately switching it to UTILITY didn't solve it.
That's too bad, I'm not sure what else I can do about it. I'll give it some thought over the next few days.
I had a quick look at the Guake source and they're doing something odd with window type hints at https://github.com/Guake/guake/blob/master/src/guake/guake_app.py#L348 - Admittedly that's gtk2 rather than gtk3 but it might provide some inspiration.
Similarly there's some more focus related things going on in the on_show handler: https://github.com/Guake/guake/blob/master/src/guake/guake_app.py#L879
Thanks @alexwhitman, I'll have a look. I'm curious if the deiconify() call would fix my Wayland issue from #471.
There should be a gtk3 branch which could give you a hint
Most helpful comment
It's been a long time but I finally added support for a quake mode. To use this, you need to configure a hotkey in gnome shell (or the DE of your choice) to run terminix with the --quake switch, i.e.
If a quake window is already running this will toggle the visibility of the window, if not it will create a new window.
Under Wayland there is a limitation that there is no option to have the terminal on anything other then the primary monitor. This is because Wayland doesn't let you programatically move a window between monitors.
I'm sure folks will find some bugs as they test it, feel free to open new bug reports for any problems you find or suggestions to improve it.