Add setBackground and setForeground escape codes#118
Merged
Conversation
5f90693 to
f293dba
Compare
|
I suggest you add a check for /sys/class/tty/tty0/ for systems that do not have virtual terminals. Something like this would work. This prevents cat from give an error that the file does not exist. Otherwise everything looks good to me. |
added 4 commits
July 18, 2025 17:40
If you switch tty, and terminate the gui application, kmscon will steal the VT. So wait to switch back to the tty that it was launched on, before sending setForeground command to kmscon. Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
After running some fullscreen application, restore the VT terminal mode. Otherwise kmscon will not receive SIGUSR1/2, and won't allow VT switching. Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
Dash doesn't support ${@:1}, and $@ works the same.
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
Collaborator
Author
|
@michael-oberpriller Thanks for the suggestion, I just pushed a new version. If no other comments, I will merge it in 1 or 2 weeks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I finally fixed VT switching issues I had with #101
I also added suggestions like TMUX escape codes, and using $@ to be compatible with dash.
It is a workaround for #107