From 92e86ff0cae0a0d9872029516afc1f707d369b24 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 21 Jan 2021 21:48:38 -0600 Subject: 2020-01-21 --- early-init.el | 79 ++++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 48 insertions(+), 31 deletions(-) (limited to 'early-init.el') diff --git a/early-init.el b/early-init.el index 103e0b4..5ebc544 100644 --- a/early-init.el +++ b/early-init.el @@ -1,53 +1,70 @@ ;; early-init.el -*- no-byte-compile: t; -*- ;; This file is automatically tangled from config.org. ;; Hand edits will be overwritten! +;; BOOTSTRAP PACKAGE MANAGEMENT +(let ((win-app-dir "~/Applications")) + (dolist (path (list + ;; Windows + (expand-file-name "Git/bin" win-app-dir) + (expand-file-name "Git/usr/bin" win-app-dir) + (expand-file-name "Git/mingw64/bin" win-app-dir) + ;; Linux + (expand-file-name "bin" + user-emacs-directory) + (expand-file-name "~/bin") + (expand-file-name "~/.local/bin") + (expand-file-name "~/Scripts") + )) + (when (file-exists-p path) + (add-to-list 'exec-path path :append)))) +;; Set $PATH +(setenv "PATH" (mapconcat #'identity exec-path path-separator)) (setq package-enable-at-startup nil) (defun acdw/bootstrap-straight () "Bootstrap straight.el." (defvar bootstrap-version) (let ((bootstrap-file - (expand-file-name - "straight/repos/straight.el/bootstrap.el" - user-emacs-directory)) - (bootstrap-version 5)) + (expand-file-name + "straight/repos/straight.el/bootstrap.el" + user-emacs-directory)) + (bootstrap-version 5)) (unless (file-exists-p bootstrap-file) (with-current-buffer - (url-retrieve-synchronously - (concat - "https://raw.githubusercontent.com/" - "raxod502/straight.el/develop/install.el") - 'silent 'inhibit-cookies) - (goto-char (point-max)) - (eval-print-last-sexp))) + (url-retrieve-synchronously + (concat + "https://raw.githubusercontent.com/" + "raxod502/straight.el/develop/install.el") + 'silent 'inhibit-cookies) + (goto-char (point-max)) + (eval-print-last-sexp))) (load bootstrap-file nil 'nomessage))) -(unless (ignore-errors (acdw/bootstrap-straight)) - (let ((msg "Straight.el didn't bootstrap correctly. Cloning directly")) - (message "%s..." msg) - (call-process "git" nil - (get-buffer-create "*bootstrap-straight-messages*") nil - "clone" - "https://github.com/raxod502/straight.el" - (expand-file-name "straight/repos/straight.el" - user-emacs-directory)) - (message "%s...Done." msg) - (acdw/bootstrap-straight))) - -(setq-default frame-inhibit-implied-resize t) - -(setq-default frame-resize-pixelwise t) - +(when (executable-find "git") + (unless (ignore-errors (acdw/bootstrap-straight)) + (let ((msg "Straight.el didn't bootstrap correctly. Cloning directly")) + (message "%s..." msg) + (call-process "git" nil + (get-buffer-create "*bootstrap-straight-messages*") nil + "clone" + "https://github.com/raxod502/straight.el" + (expand-file-name "straight/repos/straight.el" + user-emacs-directory)) + (message "%s...Done." msg) + (acdw/bootstrap-straight)))) +;; SETUP FRAME (add-to-list 'default-frame-alist - '(tool-bar-lines . 0)) + '(tool-bar-lines . 0)) (tool-bar-mode -1) (add-to-list 'default-frame-alist - '(menu-bar-lines . 0)) + '(menu-bar-lines . 0)) (menu-bar-mode -1) (add-to-list 'default-frame-alist - '(vertical-scroll-bars . nil) - '(horizontal-scroll-bars . nil)) + '(vertical-scroll-bars . nil) + '(horizontal-scroll-bars . nil)) (scroll-bar-mode -1) (horizontal-scroll-bar-mode -1) +(setq-default frame-inhibit-implied-resize t + frame-resize-pixelwise t) -- cgit 1.4.1-21-gabe81