1
0
Fork 0

rework autostarting

This commit is contained in:
Luca Bilke 2024-02-07 16:20:29 +01:00
parent 5cf8492cae
commit 4a01483f0f
14 changed files with 62 additions and 3 deletions

View File

@ -18,4 +18,8 @@ echo "Starting DWM"
dwm
echo "Exited DWM"
# echo "Killing Orphans"
# kill 15 -1
'

36
.local/libexec/dwm/autorun Executable file
View File

@ -0,0 +1,36 @@
#!/bin/sh
trap 'trap - 2 15; kill $pids $(pidof xcape) 1>/dev/null 2>&1' 2 15 EXIT
LOGFILE="${LOGFILE:-${HOME}/.local/log/session.log}"
infolog() {
while IFS= read -r line; do
echo "[$(date +%X)][INF][$1] $line" >"${LOGFILE}"
done
}
errorlog() {
while IFS= read -r line; do
echo "[$(date +%X)][ERR][$1] $line" >"${LOGFILE}"
done
}
start() {
stdout="${XDG_RUNTIME_DIR:-/tmp}/${1}-stdout"
stderr="${XDG_RUNTIME_DIR:-/tmp}/${1}-stderr"
[ -p "$stdout" ] || mkfifo "$stdout"
[ -p "$stderr" ] || mkfifo "$stderr"
cat <"$stdout" | infolog "$1" &
cat <"$stderr" | errorlog "$1" &
pidof -sx "$1" || "./$1" >"$stdout" 2>"$stderr" &
}
cd "$HOME/.local/libexec/dwm/autorun.d" || exit 1
for s in *; do
start "$s"
pids="$! $pids"
done
wait

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec pipewire

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec pipewire -c pipewire-pulse.conf

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec wireplumber

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec dunst

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec env PATH="$HOME/.local/libexec/statusbar:$PATH" dwmblocks

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec lf -server

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec picom

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec "$HOME/.local/libexec/daemons/remapd"

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec syncthingtray

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec unclutter -noevents -idle 3

View File

@ -1,6 +1,5 @@
#!/bin/sh
xset s 300
env \
exec env \
XSECURELOCK_AUTH_BACKGROUND_COLOR="#24283b" \
XSECURELOCK_AUTH_FOREGROUND_COLOR="#c0caf5" \
XSECURELOCK_AUTH_WARNING_COLOR="#f7768e" \

View File

@ -1,4 +1,4 @@
#!/bin/sh
xwallpaper --zoom "$XDG_DATA_HOME/bg"
xset s 300
remaps -qd
lf -server