From 7cc2d2605f81228b8617a962b45523b6d5e88990 Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani Date: Sat, 27 Mar 2021 21:27:20 -0400 Subject: [PATCH] Initial commit Migrating from seperate dotfiles repo --- .build.yml | 22 + LICENSE | 21 + README | 5 + config.org | 1438 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1486 insertions(+) create mode 100644 .build.yml create mode 100644 LICENSE create mode 100644 README create mode 100644 config.org diff --git a/.build.yml b/.build.yml new file mode 100644 index 0000000..cf387f7 --- /dev/null +++ b/.build.yml @@ -0,0 +1,22 @@ +image: alpine/edge +secrets: + - 5752743f-34af-46a8-aad9-b5d31e305b3b +packages: + - rsync + - git + - hugo +sources: + - https://git.sr.ht/~armaan/armaanb.net +triggers: + - action: email + condition: failure + to: me@armaanb.net +tasks: + - get-emacs-config: | + cd armaanb.net + ./bin/emacs-get + - build-http: | + cd armaanb.net + hugo --minify + - deploy: | + rsync -azre 'ssh -o StrictHostKeyChecking=no -p 23' armaanb.net/public/config.html web@armaanb.net:/var/www/armaanb.net-http/config.html diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..67ad350 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +config.org +Copyright © 2021 Armaan Bhojwani + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/README b/README new file mode 100644 index 0000000..2de3cf0 --- /dev/null +++ b/README @@ -0,0 +1,5 @@ +My system configuration in org format. + +See in rendered format at https://armaanb.net/config.html + +Copyright 2021 Armaan Bhojwani, MIT license. diff --git a/config.org b/config.org new file mode 100644 index 0000000..7e6625b --- /dev/null +++ b/config.org @@ -0,0 +1,1438 @@ +#+TITLE: System Configuration +#+DESCRIPTION: Armaan's system configuration. + +* Welcome +Welcome to my system configuration! This file contains my Emacs configuration, but also my config files for many of the other programs on my system! +** Compatability +I am currently using GCCEmacs 28 from the feature/native-comp branch, so some settings may not be available for older versions of Emacs. This is a purely personal configuration, so while I can garuntee that it works on my setup, I can't for anything else. +** Choices +I chose to create a powerful, yet not overly heavy Emacs configuration. Things like LSP mode are important to my workflow and help me be productive, so despite its weight, it is kept. Things like a fancy modeline or icons on the other hand, do not increase my productivity, and create visual clutter, and thus have been excluded. + +Another important choice has been to integrate Emacs into a large part of my computing environment (see [[*EmacsOS]]). I use Email, IRC, et cetera, all through Emacs which simplifies my workflow. + +Lastly, I use Evil mode. I think modal keybindings are simple and more ergonomic than standard Emacs style, and Vim keybindings are what I'm comfortable with and are pervasive throughout computing. +** TODOs +*** TODO Turn keybinding and hook declarations into use-package declarations where possible +*** TODO Put configs with passwords in here with some kind of authentication +- Offlineimap +- irc.el +** License +Released under the [[https://opensource.org/licenses/MIT][MIT license]] by Armaan Bhojwani, 2021. Note that many snippets are taken from online, and other sources, who are credited for their work at the snippet. +* Package management +** Bootstrap straight.el +straight.el is really nice for managing package, and it integrates nicely with use-package. It uses the bootstrapping system defined here for installation. +#+begin_src emacs-lisp + (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 + "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)) +#+end_src +** Replace use-package with straight +#+begin_src emacs-lisp + (straight-use-package 'use-package) + (setq straight-use-package-by-default t) +#+end_src +* Visual options +** Theme +Very nice high contrast theme. + +Its fine to set this here because I run Emacs in daemon mode, but if I were not, then putting it in early-init.el would be a better choice to eliminate the window being white before the theme is loaded. +#+begin_src emacs-lisp + (setq modus-themes-slanted-constructs t + modus-themes-bold-constructs t + modus-themes-org-blocks 'rainbow + modus-themes-mode-line '3d + modus-themes-scale-headings t + modus-themes-region 'no-extend + modus-themes-diffs 'desaturated) + (load-theme 'modus-vivendi t) +#+end_src +** Typography +*** Font +Great programming font with ligatures +#+begin_src emacs-lisp + (add-to-list 'default-frame-alist '(font . "JetBrainsMonoNF-12")) +#+end_src +*** Ligatures +#+begin_src emacs-lisp + (use-package ligature + :straight (ligature :type git :host github :repo "mickeynp/ligature.el") + :load-path "path-to-ligature-repo" + :config + (ligature-set-ligatures 'prog-mode '("-|" "-~" "---" "-<<" "-<" "--" "->" "->>" "-->" "///" "/=" "/==" + "/>" "//" "/*" "*>" "***" "*/" "<-" "<<-" "<=>" "<=" "<|" "<||" + "<|||" "<|>" "<:" "<>" "<-<" "<<<" "<==" "<<=" "<=<" "<==>" "<-|" + "<<" "<~>" "<=|" "<~~" "<~" "<$>" "<$" "<+>" "<+" "" "" "<->" "