This then
This commit is contained in:
parent
f75598b514
commit
f1a773498f
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
stdenv,
|
stdenv,
|
||||||
steam-fsh,
|
steam,
|
||||||
pkgs,
|
pkgs,
|
||||||
jq,
|
jq,
|
||||||
coreutils,
|
coreutils,
|
||||||
|
@ -16,7 +16,7 @@ writeShellApplication
|
||||||
|
|
||||||
name = "auto-mount";
|
name = "auto-mount";
|
||||||
|
|
||||||
runtimeInputs = [jq coreutils udisks util-linux toybox pkgs.steam];
|
runtimeInputs = [jq coreutils udisks util-linux toybox steam];
|
||||||
|
|
||||||
text = ''
|
text = ''
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
@ -75,7 +75,7 @@ writeShellApplication
|
||||||
if pgrep -x "steam" > /dev/null; then
|
if pgrep -x "steam" > /dev/null; then
|
||||||
# TODO use -ifrunning and check return value - if there was a steam process and it returns -1, the message wasn't sent
|
# TODO use -ifrunning and check return value - if there was a steam process and it returns -1, the message wasn't sent
|
||||||
# need to retry until either steam process is gone or -ifrunning returns 0, or timeout i guess
|
# need to retry until either steam process is gone or -ifrunning returns 0, or timeout i guess
|
||||||
systemd-run -M 1000@ --user --collect --wait sh -c "${pkgs.steam}/bin/steam-fhs steam://''${command}/''${encoded@Q}"
|
systemd-run -M 1000@ --user --collect --wait sh -c "${steam}/bin/steam-fhs steam://''${command}/''${encoded@Q}"
|
||||||
echo "Sent URL to steam: steam://''${command}/''${arg} (steam://''${command}/''${encoded})"
|
echo "Sent URL to steam: steam://''${command}/''${arg} (steam://''${command}/''${encoded})"
|
||||||
else
|
else
|
||||||
echo "Could not send steam URL steam://''${command}/''${arg} (steam://''${command}/''${encoded}) -- steam not running"
|
echo "Could not send steam URL steam://''${command}/''${arg} (steam://''${command}/''${encoded}) -- steam not running"
|
||||||
|
|
Loading…
Reference in a new issue