-
-
Notifications
You must be signed in to change notification settings - Fork 948
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
a command to be executed during shutdown #7671
Comments
You can script this with a systemd unit targetting shutdown.target. Ask chatgpt. Not a hyprland issue. |
ik. i mean this isnt really a issue... its a feature request but if i do before shutdown.target thus stuff like #2475 (comment) won't be achivable |
Still a systemd thing. You need a hyprland.service started by systemd and a script.service that triggers |
uncertain wdym by a hyprland.service. but if its a service that runs along hyprland or starts hyprland. then i'm pretty sure After=hyprland will make it start after hyprland start instead of when hyprland is shutting down. but even if it runs after hyprland shuts. still wont be able to do stuff like #2475 (comment) cuz
|
True my bad, it is not After. You can use |
I see.. May I know wdym by hyprland.service though? like replace display manager and just start hyprland? |
Yes |
Actually, that sounds like a good idea. since my display manager config is just autologin... ill have a try I copied the sddm service file and modified:
|
nope. doesnt work. i'm pretty sure theres a service that sets xdg_runtime_dir. suggested by https://www.reddit.com/r/archlinux/comments/167v652/hyprland_refusing_to_start_says_xdg_runtime_dir/ its a pam_systemd probelm. which idk what the service is. thus this wont work... |
please read the link provided. i am experiencing that issue. and if the env is not set. my runtime is prob not mounted as well... so hyprland will prob fail |
I am pretty sure that you can achieve it someway or another. I think that your service file is not good for hyprland. I havent use systemd to start hyprland before, but I would try login with my user in the tty and starting the service manually from it to see whats going on. |
starting it manually would work wdym by the user and group should be in my users service file? like ~/.config/systemd? |
User=youruser Also look at After= , because you just need your user to login first and after trigger it automatically. You can achieve it. Look https://wiki.archlinux.org/title/Getty#Virtual_console |
wdym? I did:
|
Ordering is reversed on deactivation. Setting Also, check this out. |
cool repo! |
On the topic though, |
yes. thats Y i'm filing this feature request. hope some maintainer sees this :D |
Look at the archwiki link I provided to you. Learn your init system to achieve what you want. You can ask on hyprland's discord too. Good luck. |
i see you can auto login. but i think
|
You can set up the hyprland service after the autologin service running as your user. That should work fine. |
@littleblack111 Try #7683 |
Ty for making it! I'll try later when I get on my computer |
closing per #7683 |
Description
like a command that executes before anything start to shutdown.
use cases of this can be for sth like: #2475 (comment)
or stuff like writing script to see if system is updating and cancel the shutdown if it is
The text was updated successfully, but these errors were encountered: