huge change
This commit is contained in:
parent
c159d2f3e3
commit
d86cc3c816
29 changed files with 1151 additions and 792 deletions
27
moduler/programs/confetti/default.nix
Normal file
27
moduler/programs/confetti/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
confettiListener = pkgs.writeShellScript "confetti-listener" ''
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
exec dbus-monitor "interface='org.freedesktop.Notifications'" | \
|
||||
while read -r line; do
|
||||
if echo "$line" | grep -q "confetti"; then
|
||||
confetti
|
||||
fi
|
||||
done
|
||||
'';
|
||||
in {
|
||||
systemd.user.services.confetti-listener = {
|
||||
description = "Listen for notifications and trigger confetti";
|
||||
after = [ "graphical-session.target" ];
|
||||
partOf = [ "graphical-session.target" ];
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
path = with pkgs; [ dbus gnugrep coreutils ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${confettiListener}";
|
||||
Restart = "always";
|
||||
RestartSec = "1s";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue