change autostart
This commit is contained in:
parent
e6b91568b1
commit
7795814991
4 changed files with 8 additions and 37 deletions
8
.config/dwm/autorun.d/setup
Executable file
8
.config/dwm/autorun.d/setup
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
xwallpaper --zoom "$XDG_DATA_HOME/bg"
|
||||
remaps -qd
|
||||
xset s 300 0
|
||||
xset dpms 0 0 0
|
||||
|
||||
pidof -s thunderbird >/dev/null 2>&1 || setsid -f thunderbird
|
||||
pidof -s ferdium >/dev/null 2>&1 || setsid -f ferdium
|
|
@ -1,30 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# TODO: Replace this script with tini
|
||||
|
||||
trap 'kill $pids $(pidof xcape) 1>/dev/null 2>&1' 2 15 EXIT
|
||||
|
||||
LOGFILE="${LOGFILE:-${HOME}/.local/log/session-$(date -I).log}"
|
||||
|
||||
log() {
|
||||
while IFS= read -r line; do
|
||||
printf "%b" "[$(date +%X)][$1]\t$line\n" >>"${LOGFILE}"
|
||||
done
|
||||
}
|
||||
|
||||
start() {
|
||||
logp="${XDG_RUNTIME_DIR:-/tmp}/${1}"
|
||||
[ -p "$logp" ] || mkfifo "$logp"
|
||||
cat <"$logp" | log "$1" &
|
||||
pidof -sx "$1" || "./$1" >"$logp" 2>&1 &
|
||||
# pidof -sx "$1" || "./$1" 2>&1 | log "$1" &
|
||||
}
|
||||
|
||||
cd "$HOME/.local/libexec/dwm/autorun.d" || exit 1
|
||||
|
||||
for s in *; do
|
||||
start "$s"
|
||||
pids="$! $pids"
|
||||
done
|
||||
|
||||
wait
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
exec runsvdir "$SVDIR"
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/sh
|
||||
xwallpaper --zoom "$XDG_DATA_HOME/bg"
|
||||
remaps -qd
|
||||
xset s 300 0
|
||||
xset dpms 0 0 0
|
Loading…
Add table
Reference in a new issue