#!/bin/sh clearpids() { echo -n "" > autostart.pids } start() { eval "$1 &" pid="$!" if ps -p "$pid" > /dev/null; then echo "$pid" >> autostart.pids fi } clearpids start "nm-applet" start "redshift-gtk" start "./dumpweather.sh" start "./dwmstatus.sh" feh --bg-scale background.jpg