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

Reload configuration on SIGHUP #1005

Closed
Matt-Deacalion opened this issue Jan 29, 2017 · 4 comments · Fixed by #3029
Closed

Reload configuration on SIGHUP #1005

Matt-Deacalion opened this issue Jan 29, 2017 · 4 comments · Fixed by #3029

Comments

@Matt-Deacalion
Copy link

I have a shell script that is executed on a uevent from udev. In this script, I have to restart Qtile. At the moment I'm accomplishing this with the following:

echo restart | qshell -s /home/matt/.cache/qtile/qtilesocket.\:0.0 &> /dev/null

This isn't ideal due to the hard coded qtilesocket path. Would it be ok to add the ability to either restart Qtile or reload the configuration file when Qtile receives a SIGHUP, adhering to the Unix convention?

@flacjacket
Copy link
Member

That should be fine to add that functionality and pretty easy with the asyncio signal handlers [1]. In the interim, if you are using the default socket location, you don't need to call qshell with the socket name, also the -c flag can be used to pass in a command.

[1] https://docs.python.org/3/library/asyncio-eventloop.html#unix-signals

@ramnes
Copy link
Member

ramnes commented Jan 18, 2021

Implemented in #2114

@ramnes
Copy link
Member

ramnes commented Feb 26, 2021

Reverted in #2257 because of #2256.

@tych0
Copy link
Member

tych0 commented Feb 26, 2021

I think it would be fine to use SIGUSR1 for this.

m-col added a commit to m-col/qtile that referenced this issue Nov 15, 2021
The spiritual successor of qtile#2114.

SIGUSR1 for reloading config.
SIGUSR2 for a full restart.

Closes qtile#1005
elParaguayo pushed a commit that referenced this issue Nov 15, 2021
The spiritual successor of #2114.

SIGUSR1 for reloading config.
SIGUSR2 for a full restart.

Closes #1005
fdev31 pushed a commit to fdev31/qtile that referenced this issue May 30, 2022
The spiritual successor of qtile#2114.

SIGUSR1 for reloading config.
SIGUSR2 for a full restart.

Closes qtile#1005
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants