Browse Source

Add install script

Frans Bergman 3 years ago
parent
commit
4445d9a439
4 changed files with 102 additions and 1 deletions
  1. 7 1
      README.md
  2. 62 0
      install.sh
  3. 2 0
      optional_packages.txt
  4. 31 0
      packages.txt

+ 7 - 1
README.md

@@ -1,3 +1,9 @@
 # dotfiles
 
-Configuration files and scripts for my i3-gaps rice.
+Configuration files and scripts for my dwm rice.
+
+## Installation
+
+```
+./install.sh
+```

+ 62 - 0
install.sh

@@ -0,0 +1,62 @@
+#!/bin/sh
+
+fancy_print() {
+    printf "\033[31m#### $1\033[0m\n"
+}
+
+fancy_print "Linking dotfiles"
+for f in ".*"
+do
+    case "$f" in
+        *.git*) continue ;;
+        *.swp)  continue ;;
+    esac
+    ln -s $(realpath $f) ~/
+done
+
+fancy_print "Sourcing .profile and .aliases"
+. ./.profile
+. ./.aliases
+
+fancy_print "Installing packages"
+xi -y $(cat packages.txt)
+
+fancy_print "Installing optional software"
+
+prompt_install()
+{
+    while true
+    do
+        echo -n "Install $1? [y/n] "
+        read yn
+        case $yn in
+            [Yy]* ) xi -y $1; break;;
+            [Nn]* ) break;;
+            * ) echo "Please answer yes or no.";;
+        esac
+    done
+}
+
+for line in $(cat optional_packages.txt)
+do
+    prompt_install "$line"
+done
+
+git_make_install()
+{
+    (
+    mkdir -p "~/git$1";
+    cd "~/git/$1";
+    git clone "$2" .;
+    make;
+    sudo make install;
+    )
+}
+
+fancy_print "Installing suckless forks"
+git_make_install "st" "https://gogs.tankernn.eu/Tankernn/st.git"
+git_make_install "dwm" "https://gogs.tankernn.eu/Tankernn/dwm.git"
+
+printf "\033[31m"
+figlet "Installation complete!"
+printf "\033[0m"

+ 2 - 0
optional_packages.txt

@@ -0,0 +1,2 @@
+firefox
+qutebrowser

+ 31 - 0
packages.txt

@@ -0,0 +1,31 @@
+base-devel
+compton
+dmenu
+feh
+font-hack-ttf
+font-hanazono
+fzf
+git
+htop
+lesspipe
+libXft-devel
+libXinerama-devel
+maim
+mpv
+neofetch
+pass
+passmenu
+pinentry-dmenu
+playerctl
+pywal
+ranger
+rofi
+surf
+sxhkd
+tabbed
+vim-huge
+xorg
+zsh
+zsh-autosuggestions
+zsh-syntax-highlighting
+figlet