diff --git a/desktop/.config/river/init b/desktop/.config/river/init index c219a99..6063cd2 100755 --- a/desktop/.config/river/init +++ b/desktop/.config/river/init @@ -1,8 +1,14 @@ #!/usr/bin/env sh +# turnstiled user service setup +if [ -d "$TURNSTILE_ENV_DIR" ]; then + echo "$DISPLAY" >"$TURNSTILE_ENV_DIR/DISPLAY" + echo "$WAYLAND_DISPLAY" >"$TURNSTILE_ENV_DIR/WAYLAND_DISPLAY" +fi + mod="Mod4" modemod="Mod1" -term=${TERMINAL:-foot} +term=${TERMINAL:-wezterm} time_to_lockscreen=300 time_to_screendim=600 time_to_suspend=900 diff --git a/services/sv/dbus/log/run b/services/sv/dbus/log/run new file mode 100755 index 0000000..3020c45 --- /dev/null +++ b/services/sv/dbus/log/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec vlogger -t dbus_user -p daemon diff --git a/services/sv/dbus/run b/services/sv/dbus/run new file mode 120000 index 0000000..b786362 --- /dev/null +++ b/services/sv/dbus/run @@ -0,0 +1 @@ +/usr/share/examples/turnstile/dbus.run \ No newline at end of file diff --git a/services/sv/river/finish b/services/sv/river/finish new file mode 100755 index 0000000..a4e7c74 --- /dev/null +++ b/services/sv/river/finish @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +if [ -d "$TURNSTILE_ENV_DIR" ]; then + [ -r "$TURNSTILE_ENV_DIR/DISPLAY" ] && rm "$TURNSTILE_ENV_DIR/DISPLAY" + [ -r "$TURNSTILE_ENV_DIR/WAYLAND_DISPLAY" ] && rm "$TURNSTILE_ENV_DIR/WAYLAND_DISPLAY" +fi diff --git a/services/sv/river/log/run b/services/sv/river/log/run new file mode 100755 index 0000000..596db87 --- /dev/null +++ b/services/sv/river/log/run @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +exec vlogger -t river -p daemon diff --git a/services/sv/river/run b/services/sv/river/run new file mode 100755 index 0000000..0bc4d0b --- /dev/null +++ b/services/sv/river/run @@ -0,0 +1,10 @@ +#!/bin/sh + +[ -r ./conf ] && . ./conf + +if [ -d "$TURNSTILE_ENV_DIR" ]; then + echo "$HOME/.local/bin:$PATH" > "$TURNSTILE_ENV_DIR/PATH" +fi + +exec 2>&1 +exec chpst -e "$TURNSTILE_ENV_DIR" river -log-level warning diff --git a/services/sv/turnstile-ready/conf b/services/sv/turnstile-ready/conf new file mode 100644 index 0000000..68063d2 --- /dev/null +++ b/services/sv/turnstile-ready/conf @@ -0,0 +1 @@ +core_services="dbus" diff --git a/services/sv/turnstile-ready/run b/services/sv/turnstile-ready/run new file mode 100755 index 0000000..5b6d120 --- /dev/null +++ b/services/sv/turnstile-ready/run @@ -0,0 +1,5 @@ +#!/bin/sh +[ -r ./conf ] && . ./conf +[ -n "$core_services" ] && SVDIR=".." sv start $core_services +[ -p "/run/turnstiled/1000/ready" ] && printf "/home/marty/.local/state/service/turnstile-ready" > "/run/turnstiled/1000/ready" +exec pause