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

Feature: Only Programatically Send String when Idle #902

Merged
merged 7 commits into from Dec 26, 2021

Conversation

henry701
Copy link
Contributor

Add "Only when Idle" modifier to the "Programmatically Send String" function of Advanced Parameters connection settings.

The main use-case for this is when your send-string is meant to bypass firewalls that ignore TCP Keep-Alive and kill idle sessions anyway, however could interfere with normal terminal usage when actively using the session.

Right-clicking and using the "Stop programmatically string sending" feature works for this, but it's manual, annoying, and prone to human error.

This new modifier, when enabled (it's off by default, of course) re-adds the timed event (Glib::Timeout), therefore resetting the timer, each time one of the following happens:

  • Terminal receives focus
  • Terminal cursor changes location (same trigger for changing tab color)
  • A character is typed in the terminal

Also includes the extraction of the timer event adder to a separate private function, and the deduplication of one block of code that did the same thing inside the "Stop programmatically string sending" feature.

@gfrenoy gfrenoy added this to the 6.4.0 milestone Dec 25, 2021
@gfrenoy
Copy link
Contributor

gfrenoy commented Dec 25, 2021

Very cool feature Henrique :) I was indeed looking for something like this :)

Very minor question : why did you remove the documentation about "Create SOCKS tunnel" / SOCKS5_PORT option (here) ? Was this intentional ?

@gfrenoy
Copy link
Contributor

gfrenoy commented Dec 25, 2021

How does it look for you ? Here there is not enough place to see the number of seconds
image

Should we try to make this a bit more compact?

"Programatically send string" --> "Send string"
"With " --> ""
"Every (secs) --> "Every"
"Only when Idle" --> "Idle only"

Also, a specific tooltip explaining whan "Only when Idle" does could be also useful.

That being said it looks to work fine, thanks a lot :)

@henry701
Copy link
Contributor Author

henry701 commented Dec 25, 2021

Very cool feature Henrique :) I was indeed looking for something like this :)

Very minor question : why did you remove the documentation about "Create SOCKS tunnel" / SOCKS5_PORT option (here) ? Was this intentional ?

It was intentional because this feature is no longer present on that configuration screen. I think it was moved here some time ago:

image

How does it look for you ? Here there is not enough place to see the number of seconds image

Here it looks like this, but I'm not using the default font:

image

Should we try to make this a bit more compact?

"Programatically send string" --> "Send string" "With " --> "" "Every (secs) --> "Every" "Only when Idle" --> "Idle only"

Will change to Idle only, but I think omitting "secs" from the other label could be bad. Will make it more compact anyways.

Also, a specific tooltip explaining what "Only when Idle" does could be also useful.

Will do!

@henry701
Copy link
Contributor Author

@gfrenoy Done!

@gfrenoy gfrenoy merged commit 61f50ad into asbru-cm:loki Dec 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants