3 ####################################################
4 ## script for paperbenni-dwm autostart ##
5 ####################################################
7 bashes=$(pgrep bash | wc -l)
8 if [ "$bashes" -gt 2 ]; then
13 if acpi | grep -q '%'; then
14 export ISLAPTOP="true"
15 echo "laptop detected"
20 if command -v picom &>/dev/null; then
28 if command -v deadd &>/dev/null; then
29 if ! pgrep deadd; then
37 # chrome os wallpaper changer
38 [ -e /home/benjamin/paperbenni/menus/dm/wg.sh ] &&
39 bash /home/benjamin/paperbenni/menus/dm/wg.sh
41 [ -e /home/benjamin/paperbenni/monitor.sh ] &&
42 bash /home/benjamin/paperbenni/monitor.sh
44 # apply german keybpard layout
47 [ -n "$ISLAPTOP" ] && nm-applet &
53 command -v conky &>/dev/null && conky &
63 if [ -e ~/.dwmsilent ]; then
68 # run every 60 seconds
69 if [ "$REPETITIONS" = "xxxxxx" ]; then
70 if ping -q -c 1 -W 1 8.8.8.8; then
76 # battery indicator on laptop
77 [ -n "$ISLAPTOP" ] && BATTERY="B$(acpi | egrep -o '[0-9]*%')"
81 REPETITIONS="$REPETITIONS"x
84 addstatus "$(date +'%d-%m|%H:%M')"
85 addstatus "A$(amixer get Master | egrep -o '[0-9]{1,3}%' | head -1)"
86 [ -n "$ISLAPTOP" ] && addstatus "$BATTERY"
89 xsetroot -name "$date"