diff --git a/bin/.local/bin/sess b/bin/.local/bin/sess new file mode 100755 index 0000000..078753f Binary files /dev/null and b/bin/.local/bin/sess differ diff --git a/bin/.local/bin/setup.sh b/bin/.local/bin/setup.sh index bde0d73..1e00f29 100755 --- a/bin/.local/bin/setup.sh +++ b/bin/.local/bin/setup.sh @@ -157,13 +157,15 @@ ensure_flathub() { } # -------- Package sets (portable intent) -------- +EMACS_PKG="emacs" + # Required by you: CORE_CLI=(fzf direnv stow pass just) # Plus from your history / common tooling: EXTRA_CLI=(fd git) -DEV_TOOLS_LINUX=(cmake libtool make gcc gcc-c++) +DEV_TOOLS_LINUX=(cmake libtool make gcc gcc-c++ emacs) UTILS_LINUX=(gnuplot graphviz shfmt shellcheck pandoc) DESKTOP_LINUX=(kitty alacritty dino syncthing) @@ -207,6 +209,7 @@ MAC_BREW_PKGS=( postgresql syncthing pinentry-mac + emacs ) MAC_CASKS=( @@ -215,6 +218,7 @@ MAC_CASKS=( slack google-chrome chromium + emacs-app ) # FreeBSD name mapping (best-effort) @@ -227,7 +231,7 @@ MAC_CASKS=( # - direnv exists. FREEBSD_CORE=(fzf direnv stow just password-store) FREEBSD_EXTRA=(fd-find editorconfig-core-c git) -FREEBSD_DEV=(cmake libtool gmake llvm) # gmake instead of make; llvm as a sane default toolchain +FREEBSD_DEV=(cmake libtool gmake llvm emacs) # gmake instead of make; llvm as a sane default toolchain FREEBSD_UTILS=(gnuplot graphviz shfmt shellcheck pandoc) FREEBSD_SECURITY=(gnupg pinentry) # helpful for pass FREEBSD_MISC=(postgresql16-client syncthing) @@ -346,22 +350,28 @@ EOF log "Done." -# -------- Doom Emacs -------- -DOOM_DIR="${DOOM_DIR:-$HOME/.emacs.d}" -if [[ -d "$DOOM_DIR/.git" ]]; then - log "Doom Emacs already present at $DOOM_DIR (updating)..." - git -C "$DOOM_DIR" pull --rebase || true -elif [[ -e "$DOOM_DIR" ]]; then - log "Skipping Doom Emacs clone because $DOOM_DIR exists but is not a git repo." - log "Move it aside if you want to install Doom there." +# -------- Doom Emacs (requires emacs binary) -------- +if ! have emacs; then + log "WARNING: emacs binary not found in PATH — skipping Doom Emacs installation." + log "Install emacs via your package manager and re-run this script, or run:" + log " ~/.emacs.d/bin/doom install" else - log "Cloning Doom Emacs to $DOOM_DIR..." - git clone --depth=1 https://github.com/doomemacs/doomemacs "$DOOM_DIR" -fi + DOOM_DIR="${DOOM_DIR:-$HOME/.emacs.d}" + if [[ -d "$DOOM_DIR/.git" ]]; then + log "Doom Emacs already present at $DOOM_DIR (updating)..." + git -C "$DOOM_DIR" pull --rebase || true + elif [[ -e "$DOOM_DIR" ]]; then + log "Skipping Doom Emacs clone because $DOOM_DIR exists but is not a git repo." + log "Move it aside if you want to install Doom there." + else + log "Cloning Doom Emacs to $DOOM_DIR..." + git clone --depth=1 https://github.com/doomemacs/doomemacs "$DOOM_DIR" + fi -if [[ -d "$DOOM_DIR" ]]; then - log "Installing Doom Emacs..." - "$DOOM_DIR/bin/doom" install + if [[ -d "$DOOM_DIR" ]]; then + log "Installing Doom Emacs..." + "$DOOM_DIR/bin/doom" install + fi fi # -------- asdf plugins --------