focus-last.py: Terminate threads and re-instantiate after a broken pipe#179
Open
elig0n wants to merge 2 commits intoaltdesktop:masterfrom
Open
focus-last.py: Terminate threads and re-instantiate after a broken pipe#179elig0n wants to merge 2 commits intoaltdesktop:masterfrom
elig0n wants to merge 2 commits intoaltdesktop:masterfrom
Conversation
when restarting i3 the socket connection is lost (broken pipe), requiring manual restart of the script and optionally killing the amassing previous one(s) this invents a stop mechanism for the threads and also re-instantiate FocusWatcher when a broken pipe exception is detected history is lost but registry continues on current session
and EOL spaces
Member
|
I would like to merge this, but it would be breaking for people who use |
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.
When restarting i3 the socket connection with the script is lost (broken pipe), requiring manual restart of the script and also optionally killing the previous rogue instance(s).
This PR invents a stopping mechanism for the threads which then re-instantiate
FocusWatcherafter a broken pipe exception is detected, thereby providing uninterrupted operation of the script between restarts. (It takes a few seconds until it re-establishes)The last remembered window is lost but registry continues on the new session as the user keeps changing focus.
Maybe someone else can assist to implement persistent history?
Fixes and improvements are welcome