######################################################
## 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"
groupadd "$1" &>/dev/null
for USER in $(ls /home/ | grep -v '+'); do
if ! sudo su "$USER" -c groups | grep -Eq " $1|$1 "; then
- sudo gpasswd -a $USER $1
+ sudo gpasswd -a "$USER" "$1"
fi
done
}
RAW="https://raw.githubusercontent.com"
-curl -s "https://raw.githubusercontent.com/instantOS/instantASSIST/master/install.sh" | bash
-
-# 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
addenv -f "QT_QPA_PLATFORMTHEME" "qt5ct"
addenv -f "PAGER" "less"
-command -v nvim &>/dev/null && addenv -f "EDITOR" "$(which nvim)"
+addenv -f "EDITOR" "$(which nvim)"
# needed for instantLOCK
if grep -q 'nobody' </etc/groups || grep -q 'nobody' </etc/group; then
echo "java workaround already applied"
fi
+# color scheme for tty
+if ! grep -q '# nord colors' /etc/profile; then
+ echo "applying color scheme"
+
+ echo '# nord colors' >>/etc/profile
+ echo 'if [ "$TERM" = "linux" ]; then' >>/etc/profile
+
+ cat <<EOT >>/etc/profile
+ echo -en "\e]P0383c4a" #black
+ echo -en "\e]P8404552" #darkgrey
+ echo -en "\e]P19A4138" #darkred
+ echo -en "\e]P9E7766B" #red
+ echo -en "\e]P24BEC90" #darkgreen
+ echo -en "\e]PA3CBF75" #green
+ echo -en "\e]P3CFCD63" #brown
+ echo -en "\e]PBFFD75F" #yellow
+ echo -en "\e]P45294e2" #darkblue
+ echo -en "\e]PC579CEF" #blue
+ echo -en "\e]P5CE50DD" #darkmagenta
+ echo -en "\e]PDE7766B" #magenta
+ echo -en "\e]P66BE5E7" #darkcyan
+ echo -en "\e]PE90FDFF" #cyan
+ echo -en "\e]P7CCCCCC" #lightgrey
+ echo -en "\e]PFFFFFFF" #white
+ clear #for background artifacting
+fi
+
+EOT
+
+fi
+
if [ -e /etc/lightdm/lightdm.conf ] && ! grep -q 'instantwm' /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' /etc/lightdm/lightdm.conf
mkdir /tmp/instantinstall
cd /tmp/instantinstall
-git clone --depth=1 https://github.com/instantOS/instantOS.git
-cd instantOS
-rm -rf .git
-
-cd programs
-
-for i in ./*; do
- FILENAME=${1##*/}
- echo "installing $FILENAME"
- cat $i | sudo tee /usr/local/bin/$FILENAME &>/dev/null
- sudo chmod 755 /usr/local/bin/"$FILENAME"
-done
-
-# session for lightdm
-sudo mv instantwm.desktop /usr/share/xsessions/
-sudo chmod 644 /usr/share/xsessions/instantwm.desktop
-
-cd ..
-
-rm -rf instantOS
-
-# 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
-
- sudo mkdir -p /etc/X11/xorg.conf.d && sudo tee /etc/X11/xorg.conf.d/90-touchpad.conf <<'EOF' 1>/dev/null
-Section "InputClass"
- Identifier "touchpad"
- MatchIsTouchpad "on"
- Driver "libinput"
- Option "Tapping" "on"
-EndSection
-
-EOF
-
- # three and four finger swipes on laptop
- if ! command -v libinput-gestures &>/dev/null; then
- git clone --depth=1 https://github.com/bulletmark/libinput-gestures.git
- cd libinput-gestures
- sudo make install
- cd ..
- rm -rf libinput-gestures
- fi
- fi
-else
- echo "system is on a desktop"
-fi
-
echo "the theme is $THEME"
-iclone() {
- echo "cloning $1"
- gitclone instantOS/$1 &>/dev/null
- if [ -e "$1"/build.sh ]; then
- cd "$1"
- ./build.sh "$THEME"
- cd ..
- rm -rf "$1"
- cd /tmp/instantosbin
- fi
-}
+cd /tmp
+rm -rf instantos
-rm -rf /tmp/instantosbin &>/dev/null
-mkdir /tmp/instantosbin
-cd /tmp/instantosbin
+# check if computer is a potato
+if grep -iq 'Ryzen' /proc/cpuinfo || lshw -C display | grep -q 'nvidia'; then
+ echo "classifying pc as not a potato"
+else
+ echo "looks like your pc is a potato"
+ mkdir -p /opt/instantos
+ echo "true" >/opt/instantos/potato
+fi
-iclone instantWM
-iclone instantMENU
-iclone instantLOCK
+# install a custom repo
+if ! grep -q '\[instant\]' /etc/pacman.conf; then
+ echo "instantos repo not found"
-cd /tmp
-rm -rf instantos
+ echo '# paperbegin' >>/etc/pacman.conf
+ echo '[instant]' >>/etc/pacman.conf
+ echo 'SigLevel = Optional TrustAll' >>/etc/pacman.conf
+ echo 'Server = http://instantos.surge.sh' >>/etc/pacman.conf
+ echo '# paperend' >>/etc/pacman.conf
-mkdir -p /opt/instantos/scripts
-cd /opt/instantos/scripts
-curl -s "$RAW/instantOS/instantWALLPAPER/master/wall.sh" >wall.sh
-curl -s "$RAW/instantOS/instantWALLPAPER/master/offlinewall.sh" >offlinewall.sh
-curl -s "$RAW/instantOS/instantOS/master/monitor.sh" >monitor.sh
-curl -s "$RAW/instantOS/instantOS/master/autostart.sh" >autostart.sh
-chmod 755 *.sh
+else
+ echo "instantOS repo found"
+fi