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

Add preliminary single-instance support for drop-down mode #1115

Closed

Conversation

marcusbritanicus
Copy link

@marcusbritanicus marcusbritanicus commented Apr 25, 2024

This PR adds preliminary support for single instance mode for drop-down mode. Additionally, it adds support for toggling the drop-down instance via qterminal -d command line. On wayland, we can simply add a command-binding pair for most compositors. On wayfire, this would simply be adding the following lines under the [command] section.

binding_qterminal_dd: KEY_F12
command_qterminal_dd: qterminal -d

If an instance of qterminal in the drop-down mode exists, it will toggle it. Otherwise, a new drop-down instance will be created. The normal qterminal instances are unaffected.

This fixes both #1028 and #1059. Since it's not possible to fix one without the other, I am breaking the one-issue-one-PR rule.

Cc: @yan12125 @stefonarch @tsujan

CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
@stefonarch stefonarch requested review from shlyakpavel and yan12125 and removed request for shlyakpavel April 26, 2024 06:09
@stefonarch stefonarch marked this pull request as ready for review April 26, 2024 06:10
@stefonarch
Copy link
Member

Works as it should - for me GTM

@yan12125 yan12125 removed their request for review May 3, 2024 11:10
@yan12125
Copy link
Member

yan12125 commented May 3, 2024

Removing myself as a reviewer as I stopped maintaining qterminal and qtermwidget, see lxqt/lxqt#2564

@tsujan
Copy link
Member

tsujan commented May 3, 2024

I'll review it after QTerminal 2.0 is released.

@tsujan
Copy link
Member

tsujan commented May 20, 2024

Although this code seems OK, I'm afraid not only a D-Bus-based single instance needs much less code (because D-Bus is already used), but also it's more reliable than the socket-lock method (I say that based on my experience with old versions of FeatherPad).

Here is the D-Bus-based PR: #1131

@marcusbritanicus
Copy link
Author

@tsujan Just tested #1131. It works great!! I'll close this.

@stefonarch
Copy link
Member

Works ok here too, but thanks to @marcusbritanicus 's code which made it already possible to have it for the last weeks ;)

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 this pull request may close these issues.

4 participants