3 ###############################################
4 ## script for instantOS autostart ##
5 ###############################################
8 bashes=$(pgrep bash | wc -l)
9 if [ "$bashes" -gt 2 ]; then
10 echo "already running"
18 if ! [ -e instantos ]; then
23 # find out if we're on an installation medium
24 if command -v calamares_polkit &>/dev/null; then
26 echo "live session detected"
29 # fix small graphical glitch on status bar startup
34 if acpi | grep -q '[0-9]%' &>/dev/null; then
35 export ISLAPTOP="true"
36 echo "laptop detected"
41 if ! [ -e /opt/instantos/potato ]; then
44 echo "your computer is a potato"
47 if ! xrdb -query -all | grep -q 'ScrollPage:.*false'; then
52 mkdir -p /tmp/notifications &>/dev/null
53 if ! pgrep dunst; then
64 if [ -z "$ISLIVE" ]; then
66 if ! grep -q '....' ~/instantos/monitor/max.txt; then
70 [ -e ~/instantos/monitor.sh ] &&
71 bash ~/instantos/monitor.sh &
73 if ping google.com -c 2; then
76 # fall back to already installed wallpapers
77 instantwallpaper offline
78 for i in $(seq 10); do
79 if ping google.com -c 2; then
88 # apply german keybpard layout
89 if locale | grep -q 'de_DE'; then
93 cat /usr/share/instantwidgets/tooltips.txt | shuf | head -1 >~/.cache/tooltips.txt
94 conky -c /usr/share/instantwidgets/tooltips.conf
98 feh --bg-scale /usr/share/instantwallpaper/defaultphoto.png
99 conky -c /usr/share/instantwidgets/install.conf &
107 # laptop specific background jobs
108 if [ -n "$ISLAPTOP" ]; then
109 command -v libinput-gestures \
112 ! pgrep nm-applet && nm-applet &
115 source /usr/bin/instantstatus