diff --git a/install b/install index 2826ce9..468d3ba 100755 --- a/install +++ b/install @@ -25,24 +25,25 @@ HOST="$(hostname)" # Directories which should be created DIRECTORIES=( + ".local/keys" ".local/log" + ".local/share/gnupg/" "build" "documents" "downloads" - ".local/keys" "music" "pictures" "projects" "videos" - ".local/share/gnupg/" ) WORK_DIRECTORIES=( - "work" - ".local/log" - "downloads" ".local/keys" + ".local/log" ".local/share/gnupg/" + "downloads" + "pictures" + "work" ) # Files which should be symlinked in the home folder @@ -51,7 +52,6 @@ LINKED_FILES_HOME=( ".config/autokey" ".config/bat" ".config/cmus" - ".config/sxhkd" ".config/compton" ".config/cron" ".config/custom" @@ -61,18 +61,19 @@ LINKED_FILES_HOME=( ".config/gtk-2.0" ".config/gtk-3.0" ".config/httpie" - ".config/maven" - ".config/octave" ".config/i3" + ".config/maven" ".config/mpv" ".config/newsboat" ".config/npm" + ".config/octave" ".config/pacman" ".config/polybar" ".config/python" ".config/redshift" ".config/sqlite3" ".config/streamlink" + ".config/sxhkd" ".config/task" ".config/Trolltech.conf" ".config/user-dirs.dirs" @@ -121,6 +122,30 @@ RUST_COMPONENTS=( "rustfmt" ) +# npm packages which should be installed globally +NPM_PACKAGES=( + "@vue/cli" + "eslint" + "gatsby-cli" + "npm-check-updates" +) + +############################################################################### +# Installtion information # +############################################################################### +echo "${BOLD}Before you continue with this script make sure that:" +echo " • The user severin is added to the sudoers file" +echo " • The multilib repository is uncommented in /etc/pacman.conf" +echo -e " • Your SSH keys are located in ~/.ssh${RESET}" + +read -p "Are you ready to continue? (y/n): " -n 1 -r +echo "" + +if [[ $REPLY =~ ^[nN]$ ]] +then + exit +fi + ############################################################################### # Install package manager and packages # ############################################################################### @@ -162,6 +187,9 @@ print_log "Installing ${package_count} packages" yay -Syy > /dev/null 2>&1 yay -S --noconfirm --sudoloop --needed --devel --nopgpfetch --mflags --skippgpcheck - < "${PACKAGES_DIR}/packages.aur.list" +print_section "Installing global npm packages" +print_log "Installing ${#NPM_PACKAGES[@]} packages" +npm i -g "${NPM_PACKAGES[@]}" ############################################################################### # Creating directories # @@ -183,6 +211,25 @@ else done fi +if [ "${IS_WORK}" = "0" ]; then + print_section "Setup notes directory" + if [ ! -d "${HOME}/notes" ]; then + git clone gl:notes "${HOME}/notes" + print_log "Created notes directory" + else + print_log "Notes directory already exists" + fi + + print_section "Setup tasks directory" + if [ ! -d "${HOME}/tasks" ]; then + git clone gl:tasks "${HOME}/tasks" + print_log "Created tasks directory" + else + print_log "Tasks directory allready exists" + fi +fi + + ############################################################################### # Creating symlinks # ############################################################################### @@ -195,11 +242,13 @@ do done -for file in "${!LINKED_FILES[@]}"; do - print_log "Linking ${YELLOW}${file}${RESET} to ${YELLOW}${LINKED_FILES[${file}]}${RESET}" - rm -rf "${file}" - ln -fs "${LINKED_FILES[${file}]}" "${file}" -done +if [ "${IS_WORK}" = "0" ]; then + for file in "${!LINKED_FILES[@]}"; do + print_log "Linking ${YELLOW}${file}${RESET} to ${YELLOW}${LINKED_FILES[${file}]}${RESET}" + rm -rf "${file}" + ln -fs "${LINKED_FILES[${file}]}" "${file}" + done +fi ############################################################################### @@ -301,4 +350,13 @@ print_log "Issue file created" ############################################################################### print_section "Set default shell" chsh -s "/bin/zsh" -print_log "Set default shell to zsh" \ No newline at end of file +print_log "Set default shell to zsh" + +############################################################################### +# Post installation information # +############################################################################### +print_section "Manual TODOs" +print_log "Run ${YELLOW}~/.config/polybar/scripts/gmail/auth.py${RESET}" +if [ "${IS_WORK}" = "0" ]; then + print_log "Add taskwarrior keys to ${YELLOW}~/.local/keys/taskwarrior/${RESET}" +fi \ No newline at end of file diff --git a/post-install b/post-install deleted file mode 100755 index 9ddc5ac..0000000 --- a/post-install +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env bash -# -# SCRIPT NAME: -# post-install -# -# AUTHOR: -# Severin Kaderli -# -# DESCRIPTION: -# This is the post-install script for my dotfiles. It should be only run -# after install has been run and the system has been rebooted. This script -# installs global npm packages. -# -# USAGE: -# ./post-install -. ./system/.local/bin/utils - -set -e - -####################################### -# Configuration variables -####################################### -# npm packages which should be installed globally -NPM_PACKAGES=( - "@vue/cli" - "eslint" - "gatsby-cli" - "npm-check-updates" -) - - - -####################################### -# Main code -####################################### -print_section "Setup notes directory" -if [ ! -d "${HOME}/notes" ]; then - git clone gl:notes "${HOME}/notes" - print_log "Created notes directory" -else - print_log "Notes directory already exists" -fi - -print_section "Setup tasks directory" -if [ ! -d "${HOME}/tasks" ]; then - git clone gl:tasks "${HOME}/tasks" - print_log "Created tasks directory" -else - print_log "Tasks directory allready exists" -fi - -print_section "Installing global npm packages" -print_log "Installing ${#NPM_PACKAGES[@]} packages" -npm i -g "${NPM_PACKAGES[@]}" - - - -print_section "Manual TODOs" -print_log "Run ${YELLOW}~/.config/polybar/scripts/gmail/auth.py${RESET}" -print_log "Add taskwarrior keys to ${YELLOW}~/.local/keys/taskwarrior/${RESET}" - -# ADD user to sudoers manually -# Comment out [Multilib] \ No newline at end of file diff --git a/system/.config/X11/xsetup b/system/.config/X11/xsetup index e9f5e7f..b339bff 100644 --- a/system/.config/X11/xsetup +++ b/system/.config/X11/xsetup @@ -13,8 +13,9 @@ # USAGE: # This script is sourced by both .xinitrc and .xprofile xset s off -xset -dpms xset s noblank +xset -dpms + # Set keyboard layout setxkbmap -model pc105 -layout ch diff --git a/system/.config/i3/config.work b/system/.config/i3/config.work index b3c1bda..3f9ebb5 100644 --- a/system/.config/i3/config.work +++ b/system/.config/i3/config.work @@ -35,4 +35,3 @@ exec slack exec nemo exec nemo -exec keepassxc