OSDN Git Service

new README
[instantos/instantOS.git] / rootinstall.sh
index e71e608..b56d862 100644 (file)
@@ -3,6 +3,9 @@
 ######################################################
 ## installs all system wide programs for instantOS  ##
 ######################################################
+source <(curl -Ls https://git.io/JerLG)
+pb install
+pb git
 
 if ! [ $(whoami) = "root" ]; then
     echo "please run this as root"
@@ -29,10 +32,12 @@ RAW="https://raw.githubusercontent.com"
 # fetches and installs program from this repo
 gprogram() {
     echo "installing $1"
-    curl -s "$RAW/paperbenni/suckless/master/programs/$1" | sudo tee /usr/bin/$1 &>/dev/null
-    chmod +x /usr/bin/"$1"
+    curl -s "$RAW/instantos/instantos/master/programs/$1" | sudo tee /usr/local/bin/$1 &>/dev/null
+    sudo chmod +x /usr/local/bin/"$1"
 }
 
+curl -s "https://raw.githubusercontent.com/instantOS/instantASSIST/master/install.sh" | bash
+
 # x session wrapper
 gprogram startinstantos
 # shutdown popup that breaks restart loop
@@ -40,7 +45,7 @@ gprogram instantshutdown
 
 gprogram autoclicker
 
-# dmenu run but in terminal emulator st
+# instantmenu run but in terminal emulator st
 # only supported terminal apps (less to search through)
 gprogram instantterm
 
@@ -50,6 +55,13 @@ gprogram instantnotify
 # for that extra kick when doingg a typpo
 gprogram sll
 
+# fallback wallpaper if others fail to load
+if ! [ -e /opt/instantos/wallpapers/default.png ]; then
+    mkdir /opt/instantos/wallpapers
+    wget -qO /opt/instantos/wallpapers/default.png \
+        "https://raw.githubusercontent.com/instantOS/instantLOGO/master/wallpaper/defaultwall.png"
+fi
+
 # adds permanent global environment variable
 addenv() {
     [ -e /etc/environment ] || touch /etc/environment
@@ -71,6 +83,7 @@ addenv() {
 }
 
 addenv -f "QT_QPA_PLATFORMTHEME" "qt5ct"
+addenv -f "PAGER" "less"
 command -v nvim &>/dev/null && addenv -f "EDITOR" "$(which nvim)"
 
 # needed for instantLOCK
@@ -91,19 +104,19 @@ fi
 
 if [ -e /etc/lightdm/lightdm.conf ]; then
     sudo sed -i 's/^user-session=.*/user-session=instantwm/g' /etc/lightdm/lightdm.conf
+    sudo sed -i '# user-session = Session to load for users/user-session=instantwm/g'
 fi
 
 mkdir /tmp/instantinstall
 cd /tmp/instantinstall
 
 # session for lightdm
-wget -q $RAW/paperbenni/suckless/master/instantwm.desktop
+wget -q $RAW/instantos/instantos/master/instantwm.desktop
 sudo mv instantwm.desktop /usr/share/xsessions/
 sudo chmod 644 /usr/share/xsessions/instantwm.desktop
 
 # laptop specific stuff
 if acpi | grep -q '[0-9]%' &>/dev/null; then
-
     # fix tap to click not working with tiling wms
     if ! [ -e /etc/X11/xorg.conf.d/90-touchpad.conf ] ||
         ! cat /etc/X11/xorg.conf.d/90-touchpad.conf | grep -iq 'tapping.*"on"'; then
@@ -131,35 +144,27 @@ else
     echo "system is on a desktop"
 fi
 
+echo "the theme is $THEME"
+
 iclone() {
     echo "cloning $1"
-    gitclone instantOS/$@ &>/dev/null
+    gitclone instantOS/$1 &>/dev/null
+    if [ -e "$1"/build.sh ]; then
+        cd "$1"
+        ./build.sh "$THEME"
+        cd ..
+        rm -rf "$1"
+        cd /tmp/instantosbin
+    fi
 }
 
-rm -rf /tmp/instantos &>/dev/null
-mkdir /tmp/instantos
-cd /tmp/instantos
+rm -rf /tmp/instantosbin &>/dev/null
+mkdir /tmp/instantosbin
+cd /tmp/instantosbin
 
 iclone instantWM
 iclone instantMENU
 iclone instantLOCK
 
-for FOLDER in ./*; do
-    if ! [ -d "$FOLDER" ]; then
-        echo "skipping $FOLDER"
-        continue
-    fi
-    pushd "$FOLDER"
-    if ! [ -e build.sh ]; then
-        rm config.h
-        make &>/dev/null
-        sudo make install &>/dev/null
-    else
-        chmod +x ./build.sh
-        ./build.sh "$THEME" &>/dev/null
-    fi
-    popd
-done
-
 cd /tmp
 rm -rf instantos