summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2021-01-15 23:30:37 +0100
committertv <tv@krebsco.de>2021-01-15 23:30:37 +0100
commita68e8e39f6c844f921176875ab79e69b4c66871a (patch)
tree29891820fe26c2af723b86627801c9f1b9574531
parent5f8532b51d6132157197dffde04a0a3d34982901 (diff)
tv slock service: conflicts picom service
When picom is running, slock will show the screenshot of the locked screen after DPMS changes state to `on'. https://bbs.archlinux.org/viewtopic.php?id=256547 seems related, but the suggested fix (adding `no-fading-openclose = true;` to picom's config) didn't help. With this commit, the picom service gets "suspended" while the slock service is running.
-rw-r--r--tv/3modules/slock.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/tv/3modules/slock.nix b/tv/3modules/slock.nix
index 53f7f1f62..926adc8e0 100644
--- a/tv/3modules/slock.nix
+++ b/tv/3modules/slock.nix
@@ -28,6 +28,9 @@ in {
});
'';
systemd.services."slock-${cfg.user.name}@" = {
+ conflicts = [
+ "picom@%i.target"
+ ];
environment = {
DISPLAY = ":%I";
LD_PRELOAD = pkgs.runCommandCC "slock-${cfg.user.name}.so" {
@@ -61,6 +64,8 @@ in {
restartIfChanged = false;
serviceConfig = {
ExecStart = "${pkgs.slock}/bin/slock";
+ ExecStopPost =
+ "+${pkgs.systemd}/bin/systemctl start xsession@%i.target";
OOMScoreAdjust = -1000;
Restart = "on-failure";
RestartSec = "100ms";