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

Quake style mode #10

Closed
varemenos opened this issue Jan 13, 2016 · 37 comments
Closed

Quake style mode #10

varemenos opened this issue Jan 13, 2016 · 37 comments

Comments

@varemenos
Copy link

Would you consider adding a dropdown feature to this awesome terminal emulator?

@gnunn1
Copy link
Owner

gnunn1 commented Jan 13, 2016

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.

@noctuid
Copy link

noctuid commented Jan 23, 2016

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).

@gnunn1
Copy link
Owner

gnunn1 commented Jan 23, 2016

noctuid I have no objection to that

@noctuid
Copy link

noctuid commented Jan 24, 2016

It works with terminix now, but it seems that the -x flag fails if there is another terminix window open.

@gnunn1
Copy link
Owner

gnunn1 commented Jan 24, 2016

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?

@noctuid
Copy link

noctuid commented Jan 24, 2016

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.

@luisdavim
Copy link

The approach taken by Terminator works for me, just add a keyboard shortcut to hide/reveal the terminal.

@noctuid
Copy link

noctuid commented Jan 24, 2016

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).

@gnunn1
Copy link
Owner

gnunn1 commented Jan 25, 2016

That's great, thanks for doing this.

@sferich888
Copy link

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.

@admirabilis
Copy link

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.

@gnunn1
Copy link
Owner

gnunn1 commented Apr 5, 2016

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:

lanoxx/tilda#150

@almson
Copy link

almson commented Apr 12, 2016

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).

@gnunn1
Copy link
Owner

gnunn1 commented Apr 12, 2016

@almson Please open a new issue for that and I'd be happy to look at it.

@almson
Copy link

almson commented Apr 12, 2016

@gnunn1 Ok. But my comment follows the flow of the current discussion. I edited it a little for clarity.

@gnunn1
Copy link
Owner

gnunn1 commented Apr 12, 2016

@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?

@noctuid
Copy link

noctuid commented Apr 12, 2016

@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.

@Kami-no
Copy link

Kami-no commented Apr 15, 2016

Quake mode suppose you have only 1 window, so enabling it should clearly block multiple windows feature.

@N3mesis98
Copy link

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.

@gnunn1
Copy link
Owner

gnunn1 commented Apr 22, 2016

@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
  • From a design perspective there are lot's of edge cases that would need to be addressed around drag and drop that an implementation would need to handle. i.e. dragging the only terminal in a quake'd mode version to the desktop should stop quake mode and create a normal perspective.

@N3mesis98
Copy link

N3mesis98 commented Apr 23, 2016

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 ?

@Kami-no
Copy link

Kami-no commented Apr 23, 2016

Wayland + Gnome Extension Drop Down Termial = no problem

@gnunn1
Copy link
Owner

gnunn1 commented Apr 23, 2016

@N3mesis98 Judging by this bug report it only works under xwayland, otherwise you have to manually register a hot key with Gnome.

Guake/guake#492

@gnunn1
Copy link
Owner

gnunn1 commented Apr 23, 2016

@Kami-no The extension works because it runs within the gnome desktop, Terminix does not.

@gu1ll0me
Copy link

gu1ll0me commented May 19, 2016

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

@gnunn1 gnunn1 closed this as completed in d7394f7 Sep 10, 2016
@gnunn1
Copy link
Owner

gnunn1 commented Sep 10, 2016

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.

@gu1ll0me
Copy link

Great work! Thank you very much.

@gnunn1
Copy link
Owner

gnunn1 commented Sep 10, 2016

Wiki page added here: https://github.com/gnunn1/terminix/wiki/Quake-Mode

@alexwhitman
Copy link
Contributor

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.

@alexwhitman
Copy link
Contributor

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):

  • Open Firefox
  • Hit the hotkey running terminix --quake
  • Notice Terminix doesn't have focus

However, 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.

@gnunn1
Copy link
Owner

gnunn1 commented Sep 11, 2016

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.

@alexwhitman
Copy link
Contributor

Unfortunately switching it to UTILITY didn't solve it.

@gnunn1
Copy link
Owner

gnunn1 commented Sep 12, 2016

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.

@alexwhitman
Copy link
Contributor

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.

@alexwhitman
Copy link
Contributor

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

@gnunn1
Copy link
Owner

gnunn1 commented Sep 12, 2016

Thanks @alexwhitman, I'll have a look. I'm curious if the deiconify() call would fix my Wayland issue from #471.

@varemenos
Copy link
Author

There should be a gtk3 branch which could give you a hint

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