Giter VIP home page Giter VIP logo

Comments (37)

gnunn1 avatar gnunn1 commented on May 18, 2024 5

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.

from tilix.

luisdavim avatar luisdavim commented on May 18, 2024 1

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

from tilix.

almson avatar almson commented on May 18, 2024 1

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

from tilix.

N3mesis98 avatar N3mesis98 commented on May 18, 2024 1

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.

from tilix.

gu1ll0me avatar gu1ll0me commented on May 18, 2024 1

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

from tilix.

gnunn1 avatar gnunn1 commented on May 18, 2024

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.

from tilix.

noctuid avatar noctuid commented on May 18, 2024

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

from tilix.

gnunn1 avatar gnunn1 commented on May 18, 2024

noctuid I have no objection to that

from tilix.

noctuid avatar noctuid commented on May 18, 2024

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

from tilix.

gnunn1 avatar gnunn1 commented on May 18, 2024

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?

from tilix.

noctuid avatar noctuid commented on May 18, 2024

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.

from tilix.

noctuid avatar noctuid commented on May 18, 2024

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

from tilix.

gnunn1 avatar gnunn1 commented on May 18, 2024

That's great, thanks for doing this.

from tilix.

sferich888 avatar sferich888 commented on May 18, 2024

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.

from tilix.

admirabilis avatar admirabilis commented on May 18, 2024

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.

from tilix.

gnunn1 avatar gnunn1 commented on May 18, 2024

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

from tilix.

gnunn1 avatar gnunn1 commented on May 18, 2024

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

from tilix.

almson avatar almson commented on May 18, 2024

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

from tilix.

gnunn1 avatar gnunn1 commented on May 18, 2024

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

from tilix.

noctuid avatar noctuid commented on May 18, 2024

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

from tilix.

Kami-no avatar Kami-no commented on May 18, 2024

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

from tilix.

gnunn1 avatar gnunn1 commented on May 18, 2024

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

from tilix.

N3mesis98 avatar N3mesis98 commented on May 18, 2024

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 ?

from tilix.

Kami-no avatar Kami-no commented on May 18, 2024

Wayland + Gnome Extension Drop Down Termial = no problem

from tilix.

gnunn1 avatar gnunn1 commented on May 18, 2024

@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

from tilix.

gnunn1 avatar gnunn1 commented on May 18, 2024

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

from tilix.

gu1ll0me avatar gu1ll0me commented on May 18, 2024

Great work! Thank you very much.

from tilix.

gnunn1 avatar gnunn1 commented on May 18, 2024

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

from tilix.

alexwhitman avatar alexwhitman commented on May 18, 2024

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.

from tilix.

alexwhitman avatar alexwhitman commented on May 18, 2024

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.

from tilix.

gnunn1 avatar gnunn1 commented on May 18, 2024

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.

from tilix.

alexwhitman avatar alexwhitman commented on May 18, 2024

Unfortunately switching it to UTILITY didn't solve it.

from tilix.

gnunn1 avatar gnunn1 commented on May 18, 2024

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.

from tilix.

alexwhitman avatar alexwhitman commented on May 18, 2024

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.

from tilix.

alexwhitman avatar alexwhitman commented on May 18, 2024

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

from tilix.

gnunn1 avatar gnunn1 commented on May 18, 2024

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

from tilix.

varemenos avatar varemenos commented on May 18, 2024

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

from tilix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.