Compare commits

..

2 Commits

Author SHA1 Message Date
fanyx 3c99819ce2 Update some user-runsv services 2022-07-12 12:30:59 +02:00
fanyx c8a2a19a5b add .profile 2022-07-12 11:26:19 +02:00
11 changed files with 57 additions and 5 deletions

View File

@ -12,8 +12,8 @@ pgrep -x sxhkd > /dev/null || sxhkd &
pgrep -x picom > /dev/null || picom &
~/.config/polybar/launch.sh &
pgrep -x Discord > /dev/null || Discord &
pgrep -x pipewire > /dev/null || pipewire &
pgrep -x pipewire-pulse > /dev/null || pipewire-pulse &
# pgrep -x pipewire > /dev/null || pipewire &
# pgrep -x pipewire-pulse > /dev/null || pipewire-pulse &
# $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
exec 2>&1
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
exec 2>&1
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
exec 2&>1
exec /usr/bin/syncthing -no-browser -home="$HOME/.config/syncthing"

25
.profile Normal file
View File

@ -0,0 +1,25 @@
: ${XDG_CACHE_HOME:=$HOME/.cache}
: ${XDG_CONFIG_HOME:=$HOME/.config}
: ${XDG_DATA_HOME:=$HOME/.data}
: ${XDG_RUNTIME_DIR:=/run/user/$(id -u)}
export XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR
: ${BROWSER:=firefox}
: ${EDITOR:=vim}
: ${PAGER:=less}
: ${VISUAL:=vim}
export BROWSER EDITOR PAGER VISUAL
for x in \
"$HOME/bin" \
"$HOME/.local/bin" \
"/usr/local/bin" \
"/usr/bin" \
; do
[ -d "$x" ] || continue
case ":${PATH}:" in
*":${x}:"*) ;;
*) PATH="${PATH+${PATH}:}${x}" ;;
esac
done

View File

@ -1,8 +1,13 @@
#!/bin/sh
USER=@USER@
HOME="home/$USER"
GROUPS="$(id -Gn "$USER" | tr ' ' ':')"
HOME="/home/$USER"
GROUPS=$(id -Gn "$USER" | tr ' ' ':')
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