Update some user-runsv services

This commit is contained in:
fanyx 2022-07-12 12:30:59 +02:00
parent c8a2a19a5b
commit 3c99819ce2
10 changed files with 32 additions and 5 deletions

View File

@ -12,8 +12,8 @@ pgrep -x sxhkd > /dev/null || sxhkd &
pgrep -x picom > /dev/null || picom & pgrep -x picom > /dev/null || picom &
~/.config/polybar/launch.sh & ~/.config/polybar/launch.sh &
pgrep -x Discord > /dev/null || Discord & pgrep -x Discord > /dev/null || Discord &
pgrep -x pipewire > /dev/null || pipewire & # pgrep -x pipewire > /dev/null || pipewire &
pgrep -x pipewire-pulse > /dev/null || pipewire-pulse & # pgrep -x pipewire-pulse > /dev/null || pipewire-pulse &
# $HOME/.config/polybar/launch.sh # $HOME/.config/polybar/launch.sh

3
.config/sv/dbus-session/check Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
exec >/dev/null 2>&1
exec dbus-send --session / org.freedesktop.DBus.Peer.Ping

4
.config/sv/dbus-session/run Executable file
View File

@ -0,0 +1,4 @@
#!/bin/execlineb -P
importas -i XDG_RUNTIME_DIR XDG_RUNTIME_DIR
dbus-daemon --session --nofork --nopidfile --address=unix:path=${XDG_RUNTIME_DIR}/bus

View File

@ -0,0 +1,3 @@
#!/bin/sh
exec svlogd -tt .

View File

@ -1,2 +1,4 @@
#!/bin/sh #!/bin/sh
exec 2>&1
exec pipewire-pulse exec pipewire-pulse

3
.config/sv/pipewire/log/run Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
exec svlogd -tt .

View File

@ -1,2 +1,4 @@
#!/bin/sh #!/bin/sh
exec 2>&1
exec pipewire exec pipewire

4
.config/sv/syncthing/log/run Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
exec 2&>1
exec svlogd -tt .

View File

@ -1,3 +1,4 @@
#!/bin/sh #!/bin/sh
exec 2&>1
exec /usr/bin/syncthing -no-browser -home="$HOME/.config/syncthing" exec /usr/bin/syncthing -no-browser -home="$HOME/.config/syncthing"

View File

@ -1,8 +1,13 @@
#!/bin/sh #!/bin/sh
USER=@USER@ USER=@USER@
HOME="home/$USER" HOME="/home/$USER"
GROUPS="$(id -Gn "$USER" | tr ' ' ':')" GROUPS=$(id -Gn "$USER" | tr ' ' ':')
SVDIR="$HOME/sv" SVDIR="$HOME/sv"
ID=$(id -u $USER)
exec chpst -u "$USER:$GROUPS" sh -l -c "exec runsvdir $SVDIR $USER" $USER [ ! -d /run/user/$ID ] && \
mkdir -p /run/user/$USER && \
chown $USER:$USER /run/user/$USER
exec chpst -u "$USER:$GROUPS" sh -l -c "exec runsvdir $SVDIR $USER '...'" $USER