added fix for systemd hyprland cred to alebastr/misterio77
This commit is contained in:
parent
fc1650a155
commit
3a5ddaa025
1 changed files with 30 additions and 0 deletions
30
home/ooks/opt/desktop/hyprland/systemd-fix.nix
Normal file
30
home/ooks/opt/desktop/hyprland/systemd-fix.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.wayland.windowManager.hyprland;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = lib.mkIf (cfg.enable && cfg.systemdIntegration) {
|
||||||
|
# Stolen from https://github.com/alebastr/sway-systemd/commit/0fdb2c4b10beb6079acd6073c5b3014bd58d3b74
|
||||||
|
systemd.user.targets.hyprland-session-shutdown = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Shutdown running Hyprland session";
|
||||||
|
DefaultDependencies = "no";
|
||||||
|
StopWhenUnneeded = "true";
|
||||||
|
|
||||||
|
Conflicts = [
|
||||||
|
"graphical-session.target"
|
||||||
|
"graphical-session-pre.target"
|
||||||
|
"hyprland-session.target"
|
||||||
|
];
|
||||||
|
After = [
|
||||||
|
"graphical-session.target"
|
||||||
|
"graphical-session-pre.target"
|
||||||
|
"hyprland-session.target"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
wayland.windowManager.hyprland.settings.bind = lib.mkAfter [
|
||||||
|
"SUPERSHIFT,e,exec,systemctl --user start hyprland-session-shutdown.target; hyprctl dispatch exit"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue