diff --git a/LICENSE b/LICENSE index 767282c..de537e6 100644 --- a/LICENSE +++ b/LICENSE @@ -1,14 +1,14 @@ -DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - -Version 2, December 2004 - -Copyright (C) 2004 Sam Hocevar - -Everyone is permitted to copy and distribute verbatim or modified copies of -this license document, and changing it is allowed as long as the name is changed. - -DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -0. You just DO WHAT THE FUCK YOU WANT TO. +DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + +Version 2, December 2004 + +Copyright (C) 2004 Sam Hocevar + +Everyone is permitted to copy and distribute verbatim or modified copies of +this license document, and changing it is allowed as long as the name is changed. + +DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/early-init.el b/early-init.el index 056670a..ef72beb 100644 --- a/early-init.el +++ b/early-init.el @@ -1,123 +1,123 @@ -;;; early-init.el -*- no-byte-compile: t; coding: utf-8 -*- -;; Copyright (C) 2020 Case Duckworth - -;; Author: Case Duckworth -;; Created: Sometime during the Covid-19 lockdown, 2019 -;; Keywords: configuration -;; URL: https://tildegit.org/acdw/emacs - -;; This file is not part of GNU Emacs. - -;;; Commentary: -;; This file is automatically tangled from config.org. -;; Hand edits will be overwritten! - -;;; Code: - -(message "%s..." "Loading early-init.el") -;; BOOTSTRAP PACKAGE MANAGEMENT -(let ((win-app-dir "~/Applications")) - (dolist (path (list - ;; Windows - (expand-file-name "exe" win-app-dir) - (expand-file-name "exe/bin" win-app-dir) - (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) - (expand-file-name "Everything" win-app-dir) - (expand-file-name "Win-builds/bin" win-app-dir) - (expand-file-name "Z/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)) - (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))) - (load bootstrap-file nil 'nomessage))) -(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-mode -1) -(add-to-list 'default-frame-alist - '(menu-bar-lines . 0)) - -(menu-bar-mode -1) -(add-to-list 'default-frame-alist - '(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) -(setq-default indicate-empty-lines t) -(setq-default indicate-buffer-boundaries 'right) -(setq-default visual-line-fringe-indicators '(left-curly-arrow nil)) -(defun hook--setup-fringes-curly-arrows () - "Set up curly-arrow fringes." - (define-fringe-bitmap 'left-curly-arrow - [#b11000000 - #b01100000 - #b00110000 - #b00011000]) - - (define-fringe-bitmap 'right-curly-arrow - [#b00011000 - #b00110000 - #b01100000 - #b11000000])) - -(add-hook 'after-init-hook #'hook--setup-fringes-curly-arrows) -(defun hook--setup-fringes-arrows () - "Setup arrow fringe bitmaps." - (define-fringe-bitmap 'left-arrow - [#b00000000 - #b01010100 - #b01010100 - #b00000000]) - - (define-fringe-bitmap 'right-arrow - [#b00000000 - #b00101010 - #b00101010 - #b00000000])) - -(add-hook 'after-init-hook #'hook--setup-fringes-arrows) -(message "%s... Done." "Loading early-init.el") -;;; early-init.el ends here +;;; early-init.el -*- no-byte-compile: t; coding: utf-8 -*- +;; Copyright (C) 2020 Case Duckworth + +;; Author: Case Duckworth +;; Created: Sometime during the Covid-19 lockdown, 2019 +;; Keywords: configuration +;; URL: https://tildegit.org/acdw/emacs + +;; This file is not part of GNU Emacs. + +;;; Commentary: +;; This file is automatically tangled from config.org. +;; Hand edits will be overwritten! + +;;; Code: + +(message "%s..." "Loading early-init.el") +;; BOOTSTRAP PACKAGE MANAGEMENT +(let ((win-app-dir "~/Applications")) + (dolist (path (list + ;; Windows + (expand-file-name "exe" win-app-dir) + (expand-file-name "exe/bin" win-app-dir) + (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) + (expand-file-name "Everything" win-app-dir) + (expand-file-name "Win-builds/bin" win-app-dir) + (expand-file-name "Z/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)) + (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))) + (load bootstrap-file nil 'nomessage))) +(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-mode -1) +(add-to-list 'default-frame-alist + '(menu-bar-lines . 0)) + +(menu-bar-mode -1) +(add-to-list 'default-frame-alist + '(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) +(setq-default indicate-empty-lines t) +(setq-default indicate-buffer-boundaries 'right) +(setq-default visual-line-fringe-indicators '(left-curly-arrow nil)) +(defun hook--setup-fringes-curly-arrows () + "Set up curly-arrow fringes." + (define-fringe-bitmap 'left-curly-arrow + [#b11000000 + #b01100000 + #b00110000 + #b00011000]) + + (define-fringe-bitmap 'right-curly-arrow + [#b00011000 + #b00110000 + #b01100000 + #b11000000])) + +(add-hook 'after-init-hook #'hook--setup-fringes-curly-arrows) +(defun hook--setup-fringes-arrows () + "Setup arrow fringe bitmaps." + (define-fringe-bitmap 'left-arrow + [#b00000000 + #b01010100 + #b01010100 + #b00000000]) + + (define-fringe-bitmap 'right-arrow + [#b00000000 + #b00101010 + #b00101010 + #b00000000])) + +(add-hook 'after-init-hook #'hook--setup-fringes-arrows) +(message "%s... Done." "Loading early-init.el") +;;; early-init.el ends here diff --git a/init.el b/init.el index a0e072f..7cf9f7a 100644 --- a/init.el +++ b/init.el @@ -1,51 +1,51 @@ -;;; init.el -*- lexical-binding: t; coding: utf-8 -*- -;; Copyright (C) 2020 Case Duckworth - -;; Author: Case Duckworth -;; Created: Sometime during the Covid-19 lockdown, 2019 -;; Keywords: configuration -;; URL: https://tildegit.org/acdw/emacs - -;; This file is not part of GNU Emacs. - -;;; Commentary: -;; This file is automatically tangled from config.org. -;; Hand edits will be overwritten! - -;;; Code: - -(setq-default load-prefer-newer t) - -(message "%s..." "Loading init.el") -(let* (;; Speed up init - (gc-cons-threshold most-positive-fixnum) - ;; (gc-cons-percentage 0.6) - (file-name-handler-alist nil) - ;; Config file names - (config (expand-file-name "config" - user-emacs-directory)) - (config.el (concat config ".el")) - (config.org (concat config ".org")) - (straight-org-dir (locate-user-emacs-file "straight/build/org"))) - ;; Okay, let's figure this out. - ;; `and' evaluates each form, and returns nil on the first that - ;; returns nil. `unless' only executes its body if the test - ;; returns nil. So. - ;; 1. Test if config.org is newer than config.el. If it is (t), we - ;; *want* to evaluate the body, so we need to negate that test. - ;; 2. Try to load the config. If it errors (nil), it'll bubble that - ;; to the `and' and the body will be evaluated. - (unless (and (not (file-newer-than-file-p config.org config.el)) - (load config :noerror)) - ;; A plain require here just loads the older `org' - ;; in Emacs' install dir. We need to add the newer - ;; one to the `load-path', hopefully that's all. - (when (file-exists-p straight-org-dir) - (add-to-list 'load-path straight-org-dir)) - ;; Load config.org - (message "%s..." "Loading config.org") - (require 'org) - (org-babel-load-file config.org) - (message "%s... Done" "Loading config.org"))) -(message "%s... Done." "Loading init.el") -;;; init.el ends here +;;; init.el -*- lexical-binding: t; coding: utf-8 -*- +;; Copyright (C) 2020 Case Duckworth + +;; Author: Case Duckworth +;; Created: Sometime during the Covid-19 lockdown, 2019 +;; Keywords: configuration +;; URL: https://tildegit.org/acdw/emacs + +;; This file is not part of GNU Emacs. + +;;; Commentary: +;; This file is automatically tangled from config.org. +;; Hand edits will be overwritten! + +;;; Code: + +(setq-default load-prefer-newer t) + +(message "%s..." "Loading init.el") +(let* (;; Speed up init + (gc-cons-threshold most-positive-fixnum) + ;; (gc-cons-percentage 0.6) + (file-name-handler-alist nil) + ;; Config file names + (config (expand-file-name "config" + user-emacs-directory)) + (config.el (concat config ".el")) + (config.org (concat config ".org")) + (straight-org-dir (locate-user-emacs-file "straight/build/org"))) + ;; Okay, let's figure this out. + ;; `and' evaluates each form, and returns nil on the first that + ;; returns nil. `unless' only executes its body if the test + ;; returns nil. So. + ;; 1. Test if config.org is newer than config.el. If it is (t), we + ;; *want* to evaluate the body, so we need to negate that test. + ;; 2. Try to load the config. If it errors (nil), it'll bubble that + ;; to the `and' and the body will be evaluated. + (unless (and (not (file-newer-than-file-p config.org config.el)) + (load config :noerror)) + ;; A plain require here just loads the older `org' + ;; in Emacs' install dir. We need to add the newer + ;; one to the `load-path', hopefully that's all. + (when (file-exists-p straight-org-dir) + (add-to-list 'load-path straight-org-dir)) + ;; Load config.org + (message "%s..." "Loading config.org") + (require 'org) + (org-babel-load-file config.org) + (message "%s... Done" "Loading config.org"))) +(message "%s... Done." "Loading init.el") +;;; init.el ends here