From e13cafd32b0eb24ca11e74a5cd1f546fcc3ad4fc Mon Sep 17 00:00:00 2001 From: natemaia Date: Sun, 27 Oct 2019 18:06:20 -0700 Subject: [PATCH] Tearfree config creation and nvidia driver an installer flag --- archlabs-installer | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/archlabs-installer b/archlabs-installer index 1904d82..3d66e48 100755 --- a/archlabs-installer +++ b/archlabs-installer @@ -8,7 +8,7 @@ # check for syntax errors # set -n -VER=2.0.95 +VER=2.0.96 # default values { @@ -24,6 +24,7 @@ ERR=/tmp/errlog # stderr log used internally by errshow() DBG=/tmp/debuglog # debug log file when passed -d RUN=/run/archiso/bootmnt/arch/boot # path for live system /boot VM="$(dmesg | grep -i hypervisor)" # system running in a virtual machine +TEARFREE="" # whether to install xorg configs and nvidia drivers EXMNTS="" # extra partitions that were mounted, used to verify mountpoint and show user FORMATTED="" # partitions that have been formatted, allows skipping the format step USER_CMD="" # optional command(s) entered by the user to run in the chroot @@ -1163,7 +1164,7 @@ install_main() [[ -f $MNT/swapfile ]] && sed -i "s~${MNT}~~" "$MNT/etc/fstab" install_packages # tear free configs, MUST be done after package install for nvidia - install_tearfree_conf "$MNT/etc/X11/xorg.conf.d" + [[ $TEARFREE ]] && install_tearfree_conf "$MNT/etc/X11/xorg.conf.d" install_mkinitcpio install_boot chrun "hwclock --systohc --utc" || chrun "hwclock --systohc --utc --directisa" @@ -2297,7 +2298,7 @@ live() pacman -Scc --noconfirm rm -rf /var/cache/pacman/pkg/* cp -rfT /etc/skel /root - install_tearfree_conf "/etc/X11/xorg.conf.d" + [[ $TEARFREE ]] && install_tearfree_conf "/etc/X11/xorg.conf.d" case "$ses" in plasma|gnome|cinnamon) sed -i '/super/d; /nitrogen/d; /compton/d' /root/.xprofile ;; dwm) sed -i '/super/d; /compton/d' /root/.xprofile ;; @@ -2315,9 +2316,12 @@ usage() usage: $1 [-hdl] [session] options: - -h, --help print this message and exit - -l, --live install and setup a live session - -d, --debug enable xtrace and log output to $DBG + -h, --help print this message and exit + -l, --live install and setup a live session + -d, --debug enable xtrace and log output to $DBG + -t, --tearfree install and setup drivers for nvidia or tearfree xorg configs for other vendors + if you experience boot issues with this option you can remove + /etc/X11/xorg.conf.d/20-*.conf sessions: i3-gaps - A fork of i3wm with more features including gaps @@ -2553,10 +2557,11 @@ fi # trap ^C to perform cleanup trap 'printf "\n^C\n" && die 1' INT -while getopts ":hl:d" OPT; do +while getopts ":htl:d" OPT; do case "$OPT" in d) debug ;; h) usage "$0" ;; + t) TEARFREE=true ;; l) if [[ "${!WM_SESSIONS[@]}" =~ $OPTARG ]]; then live "$OPTARG"