Gaming/retroarch: update retroarch library automatically
This commit is contained in:
parent
fcba25620b
commit
16d3391714
1 changed files with 22 additions and 0 deletions
|
|
@ -51,6 +51,28 @@
|
||||||
"d /%h/.local/share/retroarch/saves"
|
"d /%h/.local/share/retroarch/saves"
|
||||||
"d /%h/.local/share/retroarch/states"
|
"d /%h/.local/share/retroarch/states"
|
||||||
];
|
];
|
||||||
|
systemd.user.paths = {
|
||||||
|
snes-roms = {
|
||||||
|
Unit.Description = "Monitor SNES rom path for changes";
|
||||||
|
Path = {
|
||||||
|
PathChanged = "/%h/Games/SNES";
|
||||||
|
Unit = "update-retroarch-library.service";
|
||||||
|
};
|
||||||
|
Install.WantedBy = ["default.target"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
systemd.user.services.update-retroarch-library = {
|
||||||
|
Service = {
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = pkgs.writeShellScript "scan-snes-games" ''
|
||||||
|
${pkgs.libnotify}/bin/notify-send -a RetroArch \
|
||||||
|
-i retroarch \
|
||||||
|
"SNES games changed!" \
|
||||||
|
"Scanning $TRIGGER_PATH..."
|
||||||
|
${pkgs.retroarch}/bin/retroarch --scan "/home/toast/Games/SNES"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Sync saves and some other stuff
|
# Sync saves and some other stuff
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue