From e223ea0a045f1e086e0780f7c1778a94bce92ad6 Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Fri, 26 Dec 2025 11:55:21 -0500 Subject: Some tweaks and updates to dotfiles --- install.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'install.sh') diff --git a/install.sh b/install.sh index 4ef204d..29b06cd 100755 --- a/install.sh +++ b/install.sh @@ -1,5 +1,8 @@ #!/bin/sh set -e +confdir="${XDG_CONFIG_HOME:-$HOME/.config}" +bindir="${BINDIR:-$HOME/bin}" +USE_X_SCRIPTS="${USE_X_SCRIPTS:-NO}" setLink() { src="" @@ -33,28 +36,29 @@ for _f in dotfiles/* ; do setLink -s "$src" -d "$dest" done -_nvimdir="$HOME/.config/nvim" +_nvimdir="${confdir}/nvim" if ! [ -d "$_nvimdir" ] ; then mkdir "$_nvimdir" fi setLink -s "$(pwd)/dotfiles/nvim/init.lua" -d "$_nvimdir/init.lua" -_ghosttydir="$HOME/.config/ghostty" +_ghosttydir="${confdir}/ghostty" if ! [ -d "$_ghosttydir" ] ; then mkdir "$_ghosttydir" fi setLink -s "$(pwd)/dotfiles/ghostty/config" -d "$_ghosttydir/config" -if ! [ -d "$HOME/bin" ] ; then mkdir "$HOME/bin" ; fi +if ! [ -d "$bindir" ] ; then mkdir "$bindir" ; fi for _f in bin/* ; do src="$(pwd)/$_f" - dest="$HOME/bin/$(basename "$_f")" + dest="${bindir}/$(basename "$_f")" setLink -s "$src" -d "$dest" done if [ "$(uname)" != "Darwin" ] \ - && [ -n "$DISPLAY" ] && [ "$XDG_SESSION_TYPE" != "wayland" ] ; then + && [ -n "$DISPLAY" ] && [ "$XDG_SESSION_TYPE" != "wayland" ] \ + && [ "$USE_X_SCRIPTS" = "YES" ] ; then if ! [ -d "$HOME/x" ] ; then mkdir "$HOME/x" ; fi for _f in x/* ; do -- cgit v1.2.3