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

Implement an ipc-shutdown event #2318

Closed
acrisci opened this issue Apr 24, 2016 · 3 comments · Fixed by #2652
Closed

Implement an ipc-shutdown event #2318

acrisci opened this issue Apr 24, 2016 · 3 comments · Fixed by #2652
Labels
4.12 accepted Has been approved and is ok to start working on enhancement

Comments

@acrisci
Copy link
Member

acrisci commented Apr 24, 2016

This event should be triggered when the ipc is about to shutdown. It will have a "change" member that explains the reason for the shutdown.

{
  "change": "restart"
}

It can be one of "restart" or "exit". ipc-shutdown::restart will be triggered when i3 is restarted by user command (such as i3-msg restart or by binding) and ipc-shutdown::exit will be triggered when i3 exits (either X server shutdown or by command such as i3-msg exit).

@i3bot
Copy link

i3bot commented Apr 24, 2016

I don’t see a link to logs.i3wm.org. Did you follow http://i3wm.org/docs/debugging.html? (In case you actually provided a link to a logfile, please ignore me.)

@i3bot i3bot added missing-log Read the CONTRIBUTING.md file for instructions missing-version labels Apr 24, 2016
@acrisci acrisci added enhancement 4.12 and removed missing-log Read the CONTRIBUTING.md file for instructions missing-version labels Apr 24, 2016
@acrisci
Copy link
Member Author

acrisci commented Apr 24, 2016

See #1581 for complications that result from restart command and ipc.

When i3 restarts, we lose the connection to the ipc socket. This causes user scripts to exit and they must be restarted such as in an exec_always config block.

It would be nice to add a feature to an ipc library that automatically reconnects to the socket when i3 is restarted. This however would only be appropriate for restarts and not when i3 exits from a user command.

@stapelberg
Copy link
Member

Sounds good.

@stapelberg stapelberg added the accepted Has been approved and is ok to start working on label Apr 24, 2016
acrisci added a commit to acrisci/i3 that referenced this issue May 2, 2016
This event is triggered when the connection to the ipc is about to
shutdown because of a user action such as with a `restart` or `exit`
command. The `change` field indicates why the ipc is shutting down. It
can be either "restart" or "exit".

fixes i3#2318
acrisci added a commit to acrisci/i3 that referenced this issue Jul 24, 2016
This event is triggered when the connection to the ipc is about to
shutdown because of a user action such as with a `restart` or `exit`
command. The `change` field indicates why the ipc is shutting down. It
can be either "restart" or "exit".

fixes i3#2318
acrisci added a commit to acrisci/i3 that referenced this issue Jul 24, 2016
This event is triggered when the connection to the ipc is about to
shutdown because of a user action such as with a `restart` or `exit`
command. The `change` field indicates why the ipc is shutting down. It
can be either "restart" or "exit".

fixes i3#2318
acrisci added a commit to acrisci/i3 that referenced this issue Aug 6, 2016
This event is triggered when the connection to the ipc is about to
shutdown because of a user action such as with a `restart` or `exit`
command. The `change` field indicates why the ipc is shutting down. It
can be either "restart" or "exit".

fixes i3#2318
acrisci added a commit to acrisci/i3 that referenced this issue Jan 22, 2017
This event is triggered when the connection to the ipc is about to
shutdown because of a user action such as with a `restart` or `exit`
command. The `change` field indicates why the ipc is shutting down. It
can be either "restart" or "exit".

fixes i3#2318
acrisci added a commit to acrisci/i3 that referenced this issue Jan 22, 2017
This event is triggered when the connection to the ipc is about to
shutdown because of a user action such as with a `restart` or `exit`
command. The `change` field indicates why the ipc is shutting down. It
can be either "restart" or "exit".

fixes i3#2318
acrisci added a commit to acrisci/i3 that referenced this issue Jan 22, 2017
This event is triggered when the connection to the ipc is about to
shutdown because of a user action such as with a `restart` or `exit`
command. The `change` field indicates why the ipc is shutting down. It
can be either "restart" or "exit".

fixes i3#2318
acrisci added a commit to acrisci/i3 that referenced this issue Jan 22, 2017
This event is triggered when the connection to the ipc is about to
shutdown because of a user action such as with a `restart` or `exit`
command. The `change` field indicates why the ipc is shutting down. It
can be either "restart" or "exit".

fixes i3#2318
acrisci added a commit to acrisci/i3 that referenced this issue Jan 22, 2017
This event is triggered when the connection to the ipc is about to
shutdown because of a user action such as with a `restart` or `exit`
command. The `change` field indicates why the ipc is shutting down. It
can be either "restart" or "exit".

fixes i3#2318
acrisci added a commit to acrisci/i3 that referenced this issue Jan 22, 2017
This event is triggered when the connection to the ipc is about to
shutdown because of a user action such as with a `restart` or `exit`
command. The `change` field indicates why the ipc is shutting down. It
can be either "restart" or "exit".

fixes i3#2318
stapelberg pushed a commit that referenced this issue Jan 22, 2017
This event is triggered when the connection to the ipc is about to
shutdown because of a user action such as with a `restart` or `exit`
command. The `change` field indicates why the ipc is shutting down. It
can be either "restart" or "exit".

fixes #2318
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.12 accepted Has been approved and is ok to start working on enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants