3 ####################################################
4 ## script for paperbenni-dwm autostart ##
5 ####################################################
7 for i in $(pidof -x autostart.sh); do
9 if [ -z "$AUTOSTARTPID" ]; then
12 echo "other instance of dwm autostart already running"
17 [ -e ~/.cache/islaptop ] && ISLAPTOP="true"
24 # run every 60 seconds
25 if [ "$REPETITIONS" = "xxxxxx" ]; then
26 if ping -q -c 1 -W 1 8.8.8.8; then
33 REPETITIONS="$REPETITIONS"x
36 date="$(date +'%d-%m-%Y|%T')"
38 # battery indicator on laptop
39 [ -n "$ISLAPTOP" ] && date="$date|$(acpi | egrep -o '[0-9]*%')"
40 date="$date|🔊$(amixer get Master | egrep -o '[0-9]{1,3}%' | head -1)|$INTERNET"
41 xsetroot -name "$date"
45 if command -v picom &> /dev/null; then
53 if ! pgrep deadd; then
60 # chrome os wallpaper changer
61 [ -e /home/benjamin/paperbenni/menus/dm/wg.sh ] &&
62 bash /home/benjamin/paperbenni/menus/dm/wg.sh
64 [ -n "$ISLAPTOP" ] && nm-applet &