OSDN Git Service

better internet check
[instantos/instantOS.git] / userinstall.sh
index a27bd4e..6612c45 100755 (executable)
@@ -4,44 +4,39 @@
 ## installs all instantOS tools            ##
 #############################################
 
-cd "$HOME"
-
+cd || echo "ERROR: could not go to HOME"
 echo "installing instantOS tools"
 
-RAW="https://raw.githubusercontent.com"
-source <(curl -s $RAW/paperbenni/bash/master/import.sh)
-pb install
-pb git
-
-LINK="$RAW/instantos/instantos/master"
-
-if ! [ ~/.local/share/fonts/symbola.ttf ]; then
-    mkdir -p .local/share/fonts
-    cd .local/share/fonts
-    echo "installing symbola font"
-    wget -q "http://symbola.surge.sh/symbola.ttf"
-fi
-
-cd "$HOME"
-
 # laptop specific stuff
-if acpi | grep -q '[0-9]%' &>/dev/null; then
+if acpi | grep -q '.' &>/dev/null; then
     # config file to indicate being a laptop
-    touch .cache/islaptop
+    echo "device appears to be a laptop"
+    iconf -i islaptop 1
 fi
 
-cd
-mkdir -p instantos/notifications &>/dev/null
-cd instantos/notifications
+# needed for nm-applet start
+if lspci | grep -Eiq '(wifi|wireless)'; then
+    echo "device has wifi capabilities"
+    iconf -i haswifi 1
+    iconf -i wifiapplet 1
+fi
 
-if ! [ -e notification.ogg ]; then
-    wget -qO notification.ogg "https://notificationsounds.com/notification-sounds/me-too-603/download/ogg"
+# needed to disable bluetooth service
+if lsusb | grep -iq 'bluetooth'; then
+    echo "device has bluetooth"
+    iconf -i hasbluetooth 1
 fi
 
-cd ~/instantos
-rm -rf wallpapers
-mkdir wallpapers
+# change some behaviour like light for setting brightness
+if iconf -r hasnvidia
+then
+    iconf -i hasnvidia 1
+    iconf -i uselight 1
+fi
+
+instantmouse gen
+
+mkdir ~/instantos
+mkdir -p ~/.config/instantos
 
-# set instantwm as default for lightdm
-echo '[Desktop]' >.dmrc
-echo 'Session=instantwm' >>.dmrc
+iconf -i userinstall 1