mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 21:19:45 +01:00
swayosd: avoid restarting too quickly
Should fix an issue where swayosd.service would stop without starting again after restarting too quickly. Triggered by ending a Hyprland session and logging in with tuigreet. Related: https://github.com/nix-community/home-manager/pull/4316
This commit is contained in:
parent
7560dc942a
commit
465ea1f994
2 changed files with 6 additions and 0 deletions
|
@ -60,6 +60,8 @@ in {
|
|||
After = [ "graphical-session.target" ];
|
||||
ConditionEnvironment = "WAYLAND_DISPLAY";
|
||||
Documentation = "man:swayosd(1)";
|
||||
StartLimitBurst = 5;
|
||||
StartLimitIntervalSec = 10;
|
||||
};
|
||||
|
||||
Service = {
|
||||
|
@ -71,6 +73,7 @@ in {
|
|||
+ (optionalString (cfg.topMargin != null)
|
||||
" --top-margin ${toString cfg.topMargin}");
|
||||
Restart = "always";
|
||||
RestartSec = "2s";
|
||||
};
|
||||
|
||||
Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
[Service]
|
||||
ExecStart=@swayosd@/bin/swayosd-server --display DISPLAY --style '/etc/xdg/swayosd/style.css' --top-margin 0.100000
|
||||
Restart=always
|
||||
RestartSec=2s
|
||||
Type=simple
|
||||
|
||||
[Unit]
|
||||
|
@ -31,6 +32,8 @@
|
|||
Description=Volume/backlight OSD indicator
|
||||
Documentation=man:swayosd(1)
|
||||
PartOf=graphical-session.target
|
||||
StartLimitBurst=5
|
||||
StartLimitIntervalSec=10
|
||||
''
|
||||
}
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue