Update a bunch of stuff

Signed-off-by: Severin Kaderli <severin@kaderli.dev>
This commit is contained in:
Severin Kaderli 2019-05-28 22:45:13 +02:00
parent 132ecf6b37
commit 6702e43a20
Signed by: severinkaderli
GPG key ID: F419F8835B72F0C4
4 changed files with 74 additions and 79 deletions

74
install
View file

@ -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
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
###############################################################################
@ -302,3 +351,12 @@ print_log "Issue file created"
print_section "Set default shell"
chsh -s "/bin/zsh"
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

View file

@ -1,63 +0,0 @@
#!/usr/bin/env bash
#
# SCRIPT NAME:
# post-install
#
# AUTHOR:
# Severin Kaderli <severin@kaderli.dev>
#
# 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]

View file

@ -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

View file

@ -35,4 +35,3 @@ exec slack
exec nemo
exec nemo
exec keepassxc