From 750ca643624b350c93dad7bd06d868a3594ffbcf Mon Sep 17 00:00:00 2001 From: natemaia Date: Wed, 11 Jan 2023 15:48:54 -0800 Subject: [PATCH] Bump --- installer | 107 ++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 95 insertions(+), 12 deletions(-) diff --git a/installer b/installer index c8194e2..5793b2c 100755 --- a/installer +++ b/installer @@ -90,7 +90,7 @@ typeset -a WM_PKGS=( "polkit-gnome" "arandr" "dunst" -"exo" +# "exo" "feh" "nitrogen" "picom" @@ -166,14 +166,16 @@ declare -A WM_EXT=( [dk]='archlabs-skel-dk sxhkd archlabs-lemonbar' [bspwm]='archlabs-skel-bspwm jgmenu tint2 sxhkd' [fluxbox]='archlabs-skel-fluxbox jgmenu lxmenu-data' -[i3-gaps]='archlabs-skel-i3-gaps i3status perl-anyevent-i3' +[i3-wm]='archlabs-skel-i3 i3status perl-anyevent-i3' [openbox]='archlabs-skel-openbox archlabs-kickshaw archlabs-pipemenus obconf jgmenu tint2 conky lxmenu-data' +[dwm]='' ) # } # executable name for each wm/de used in ~/.xinitrc { declare -A SESSIONS=( [dk]='dk' -[i3-gaps]='i3' +[dwm]='dwm' +[i3-wm]='i3' [bspwm]='bspwm' [fluxbox]='startfluxbox' [openbox]='openbox-session' @@ -368,6 +370,7 @@ main() select_show() { local pkgs="${USER_PKGS[*]} ${SES_PKGS[*]}" fmtpkgs='' pkg='' + [[ $INSTALL_WMS == *dwm* ]] && pkgs="dwm st dmenu $pkgs" pkgs="${pkgs// / }" pkgs="${pkgs# }" @@ -707,13 +710,17 @@ select_sessions() dlg INSTALL_WMS check "Sessions" "$_sessions\n" \ dk "A dynamic tiling window manager in the vein of dwm, bspwm, and xmonad" "$(ofn dk "$INSTALL_WMS")" \ openbox "A lightweight, powerful, and highly configurable stacking wm" "$(ofn openbox "$INSTALL_WMS")" \ - i3-gaps "A fork of i3 tiling window manager with more features including gaps" "$(ofn i3-gaps "$INSTALL_WMS")" \ + i3-wm "The improved dynamic tiling window manager" "$(ofn i3-wm "$INSTALL_WMS")" \ + dwm "A dynamic WM for X that manages windows in tiled, floating, or monocle layouts" "$(ofn dwm "$INSTALL_WMS")" \ bspwm "A tiling wm that represents windows as the leaves of a binary tree" "$(ofn bspwm "$INSTALL_WMS")" \ fluxbox "A lightweight and highly-configurable window manager" "$(ofn fluxbox "$INSTALL_WMS")" [[ $INSTALL_WMS ]] || return 0 - for i in $INSTALL_WMS; do + if [[ $INSTALL_WMS =~ dwm ]]; then + msg "DWM Install" "\nThe following programs be installed with \`git clone .. && make install\` from /home/$NEWUSER/suckless\n\n\t- dwm\n\t- dmenu\n\t- st\n" + fi + for i in ${INSTALL_WMS/dwm/}; do pkgs+=("$i") done @@ -1320,7 +1327,7 @@ mount_boot() BOOT="$(awk 'NF > 0 {print $1}' <<< "$pts")" ;; *) - dlg BOOT menu "EFI Partition" "$_uefi" $pts + dlg BOOT menu "EFI Boot Partition" "$_uefi" $pts ;; esac [[ $BOOT ]] || return 1 @@ -1338,7 +1345,7 @@ mount_boot() BOOT="$(awk 'NF > 0 {print $1}' <<< "$pts")" ;; *) - dlg BOOT menu "Boot Partition" "$_biosluks" $pts + dlg BOOT menu "Legacy Boot Partition" "$_biosluks" $pts ;; esac [[ $BOOT ]] || return 1 @@ -1398,7 +1405,7 @@ mount_root() else local txt="\nSelect the root (/) partition, this is where $DIST will be installed." txt+="\n\nDevices smaller than 8G will not be shown here." - dlg ROOT menu "Mount Root" "$txt" $pts + dlg ROOT menu "Root Partition" "$txt" $pts fi fi fi @@ -1777,6 +1784,29 @@ install_user() chrun "chpasswd <<< '$NEWUSER:$USER_PASS'" 2> "$ERR" 2>&1 errshow 1 "chrun 'chpasswd <<< \"$NEWUSER:$USER_PASS\"'" + if [[ $INSTALL_WMS == *dwm* ]]; then + local dir="/home/$NEWUSER/suckless" + mkdir -pv "$dir" + for i in dwm dmenu st; do + if chrun "git clone 'https://git.suckless.org/$i' '$dir/$i'"; then + chrun "cd '$dir/$i' && make PREFIX=/usr install" + else + printf "failed to clone %s repo\n" "$i" + fi + done + + mkdir -p "$MNT/usr/share/xsessions" + cat > "$MNT/usr/share/xsessions/dwm.desktop" <<- EOF + [Desktop Entry] + Encoding=UTF-8 + Name=Dwm + Comment=Dynamic Window Manager + Exec=dwm + TryExec=dwm + Type=Application + EOF + fi + # upgrade existing home with new skeleton configs, making backups when needed (( i )) && cp -rfaT -b --suffix='.bak' "$MNT/etc/skel/" "$MNT/home/$NEWUSER" @@ -1786,7 +1816,7 @@ install_user() # remove tint2 configs if bspwm and openbox aren't being installed [[ $INSTALL_WMS =~ (bspwm|openbox) ]] || rm -rf "$MNT/home/$NEWUSER/.config/tint2" - # remove jgmenu configs if bspwm, fluxbox, and openbox aren't being installed + # remove jgmenu configs if bspwm, fluxbox, or openbox aren't being installed [[ $INSTALL_WMS =~ (fluxbox|bspwm|openbox) ]] || rm -rf "$MNT/home/$NEWUSER/.config/jgmenu" # remove geany configs if it wasn't installed @@ -1928,6 +1958,8 @@ install_packages() [[ $NEWSHELL == 'zsh' ]] && inpkg+=('zsh-completions') [[ $NEWSHELL =~ (bash|zsh) ]] && inpkg+=('bash-completion') + # needed to build dwm + [[ $INSTALL_WMS =~ dwm ]] && inpkg+=('git' 'make' 'gcc' 'pkgconf') # remove the packages we don't want on the installed system [[ ${rmpkg[*]} ]] && chrun "pacman -Rnsc ${rmpkg[*]} --noconfirm" @@ -2102,6 +2134,33 @@ install_tearfree() fi } +install_suckless() +{ + local dir="/home/$NEWUSER/suckless" + shift + + chrun "mkdir -pv '$dir'" + + for i in dwm dmenu st; do + if chrun "git clone 'https://git.suckless.org/$i' '$dir/$i'"; then + chrun "cd '$dir/$i' && make PREFIX=/usr install" + else + printf "failed to clone %s repo\n" "$i" + fi + done + + mkdir -p "$MNT/usr/share/xsessions" + cat > "$MNT/usr/share/xsessions/dwm.desktop" <<- EOF + [Desktop Entry] + Encoding=UTF-8 + Name=Dwm + Comment=Dynamic Window Manager + Exec=dwm + TryExec=dwm + Type=Application + EOF +} + install_mkinitcpio() { local add='' @@ -2247,6 +2306,30 @@ config_lightdm() fi } + + + +config_st() +{ + cat > $MNT/home/$NEWUSER/suckless/st <<-EOF + + EOF +} + +config_dwm() +{ + cat > $MNT/home/$NEWUSER/suckless/dwm <<-EOF + + EOF +} + +config_dmenu() +{ + cat > $MNT/home/$NEWUSER/suckless/dmenu <<-EOF + + EOF +} + ############################################################################### # bootloader setup # prerun_* set up the configs needed before actually running the commands @@ -2508,9 +2591,9 @@ lvm_menu() local choice while :; do dlg choice menu "Logical Volume Management" "$_lvmmenu" \ - 'create' "Create a new volume group and volumes" \ + 'create' "Create a new volume group and volume(s)" \ 'remove' "Delete an existing volume group" \ - 'remove_all' "Delete ALL volume groups and volumes" \ + 'remove_all' "Delete ALL volume groups and volume(s)" \ "back" "Return to the device management menu" case "$choice" in 'create') lvm_create && break ;; @@ -3535,7 +3618,7 @@ fi trap 'printf "\n^C\n" && die 1' INT -while getopts ":hcnrfDtb:m:d:" OPT; do +while getopts ":hcnr:fDtb:m:d:" OPT; do case "$OPT" in D) debug ;; h) usage "${0##*/}" ;;