From 6f9960831345761a53344a8243d7d8f885e6c4ea Mon Sep 17 00:00:00 2001 From: Spirit Date: Mon, 19 Aug 2024 20:10:08 +0300 Subject: [PATCH] make dwm optional --- setup-void.sh | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/setup-void.sh b/setup-void.sh index 49f3dcf..bfbc892 100755 --- a/setup-void.sh +++ b/setup-void.sh @@ -9,6 +9,7 @@ install_doas=1 sync_dotfiles=1 +install_gui=1 usage() { echo "Usage: $0 [OPTIONS]" @@ -16,6 +17,7 @@ usage() { echo ' -h, --help Display this message' echo " --no-doas Don't install doas" echo " --no-sync Don't Sync dotfiles" + echo " --no-gui Don't install GUI things" } while [ $# -gt 0 ]; do @@ -30,6 +32,9 @@ while [ $# -gt 0 ]; do --no-sync) sync_dotfiles=0 ;; + --no-gui) + install_gui=0 + ;; *) echo "Invalid argument: $1" >&2 usage @@ -48,6 +53,8 @@ fi # system full-update $doas xbps-install -Suy xbps $doas xbps-install -Suy +# install some packages that i use +$doas xbps-install -y git patch wget curl vim juliaup yt-dlp tree # setup doas if [ install_doas == 1 ]; then @@ -56,9 +63,6 @@ if [ install_doas == 1 ]; then doas="doas" fi -# install deps required for setup -$doas xbps-install -y git make gcc libX11-devel libXft-devel libXinerama-devel xorg-server xinit xauth xorg-fonts xorg-input-drivers pkg-config - mkdir ./.setup-void.temp cd ./.setup-void.temp @@ -68,26 +72,29 @@ if [ sync_dotfiles == 1 ]; then rsync -a --exclude='.git/' --exclude='LICENSE' --exclude='.gitignore' dotfiles/ $HOME fi -git clone https://github.com/spirit-x64/dwm.git -git clone https://github.com/spirit-x64/dmenu.git -git clone https://github.com/spirit-x64/st.git +if [ install_gui == 1 ]; then + $doas xbps-install -y make gcc libX11-devel libXft-devel libXinerama-devel xorg-server xinit xauth xorg-fonts xorg-input-drivers pkg-config + git clone https://github.com/spirit-x64/dwm.git + git clone https://github.com/spirit-x64/dmenu.git + git clone https://github.com/spirit-x64/st.git -cd dwm -$doas make clean install + cd dwm + $doas make clean install -cd ../dmenu -$doas make clean install + cd ../dmenu + $doas make clean install -cd ../st -$doas make clean install + cd ../st + $doas make clean install -cd .. + cd .. -echo 'exec dwm' > $HOME/.xinitrc + echo 'exec dwm' > $HOME/.xinitrc -# install other packages i use -$doas xbps-install -y patch wget curl vim firefox vscode juliaup yt-dlp tree + # packages i use that depends on gui + $doas xbps-install -y firefox vscode godot +fi $doas ln -s /usr/bin/julialauncher /usr/bin/julia