aboutsummaryrefslogtreecommitdiff
path: root/setup.sh
diff options
context:
space:
mode:
authorryo <ryo@nopwd.lol>2025-02-18 17:26:02 +0000
committerryo <ryo@nopwd.lol>2025-02-18 17:26:02 +0000
commite602a23c7ecdc315da15dd6331e96bba50b9bf39 (patch)
tree39e32dc2d827795db1ff8e765ca9d25c6042645a /setup.sh
parent8321c0e378204ed93e391b1ec3933aabe28e757d (diff)
Added setup.sh script
Diffstat (limited to 'setup.sh')
-rwxr-xr-xsetup.sh62
1 files changed, 62 insertions, 0 deletions
diff --git a/setup.sh b/setup.sh
new file mode 100755
index 0000000..d678627
--- /dev/null
+++ b/setup.sh
@@ -0,0 +1,62 @@
+#!/bin/sh
+
+# ==== DELETE THIS LINES =====
+echo "NOTHING HAPPENED!"
+echo "FIRST READ THE SCRIPT!"
+exit
+# ============================
+
+set -e
+
+prog="${0##*/}"
+
+config() {
+ mkdir -p ~/.config
+ mkdir -p ~/.local/bin
+
+ cp -ir config/* ~/.config
+ cp -i bin/* ~/.local/bin
+ cp -i zprofile ~/.zprofile
+ if [ -n "$ZSH_VERSION" ]; then
+ echo "You are not using Zsh, set your default shell:"
+ echo "$ chsh --shell /usr/bin/zsh"
+ fi
+}
+
+install() {
+ source /etc/os-release
+ distro="${NAME:-${DISTRIB_ID}}"
+ distro_install=""
+ case $distro in
+ "Arch Linux") distro_install="pacman -S --needed" ;;
+ *) echo "Distro not supported"; exit ;;
+ esac
+
+ sudo $distro_install rofi alacritty i3 i3blocks zsh neovim tmux firefox \
+ base-devel xorg-xinit xwallpaper ttf-hack ttf-liberation dunst dash \
+ zathura zathura-pdf-poppler pulseaudio pamixer brightnessctl \
+ opendoas xorg-setxkbmap
+
+ [[ "$?" -ne 0 ]] && exit
+
+ echo "=================================="
+ echo " Packages successfully installed "
+ echo "=================================="
+}
+
+usage() {
+ cat <<-_EOF
+ $prog OPTION
+
+ Options:
+ config - copy configs and scripts to their location
+ install - install required packages
+ _EOF
+ exit
+}
+
+case "$1" in
+ config) config ;;
+ install) install ;;
+ *) usage ;;
+esac