From bee4e521d7519a6f22580a8f6fa8856a9d3561c7 Mon Sep 17 00:00:00 2001 From: Taylor Bockman Date: Fri, 10 Jan 2020 17:43:27 -0800 Subject: [PATCH] Fix up stuff after fresh install test --- arch-configs/dotfiles.sh | 8 +++--- arch-configs/fresh_install.sh | 4 --- dotfiles/emacs.d/init.el | 60 ++++++++++++++++++++++++++----------------- 3 files changed, 41 insertions(+), 31 deletions(-) diff --git a/arch-configs/dotfiles.sh b/arch-configs/dotfiles.sh index ea18fad..595f334 100755 --- a/arch-configs/dotfiles.sh +++ b/arch-configs/dotfiles.sh @@ -5,11 +5,11 @@ # # Deletes/overwrites all previous dotfiles. -rm $HOME/.bashrc -rm $HOME/.bash_profile +rm -f $HOME/.bashrc +rm -f $HOME/.bash_profile rm -rf $HOME/.emacs.d rm -rf $HOME/.config/nvim -rm $HOME/.global_gitignore +rm -f $HOME/.global_gitignore sudo ln -s $HOME/essentials/dotfiles/bash/bashrc $HOME/.bashrc sudo ln -s $HOME/essentials/dotfiles/bash/bash_profile $HOME/.bash_profile @@ -27,4 +27,4 @@ if [[ "$OS_TYPE" == "darwin"* ]]; then fi -sudo ln -s $HOME/essentials/bash/inputrc $HOME/.inputrc +sudo ln -s $HOME/essentials/dotfiles/bash/inputrc $HOME/.inputrc diff --git a/arch-configs/fresh_install.sh b/arch-configs/fresh_install.sh index 3953fc5..7d77c20 100755 --- a/arch-configs/fresh_install.sh +++ b/arch-configs/fresh_install.sh @@ -20,7 +20,6 @@ sudo pacman -Syyu PACKAGES=( "yay" # Better package manager \ "inconsolata-ttf" # Inconsolata font \ "irssi" # Simply the best IRC client \ - "zsh" # Beats bash \ "emacs" \ "llvm" \ "clang" \ @@ -63,7 +62,4 @@ sudo systemctl start nordvpnd.service # OTHER STUFF HERE -echo Making ZSH the default shell for the current user -chsh -s $(which zsh) - echo Please run the dotfile script and restart your system... diff --git a/dotfiles/emacs.d/init.el b/dotfiles/emacs.d/init.el index e1ef979..6e8b09c 100644 --- a/dotfiles/emacs.d/init.el +++ b/dotfiles/emacs.d/init.el @@ -1,4 +1,35 @@ +;;-------------------------------------------------------------------------------------- +;; Enable MELPA +;;-------------------------------------------------------------------------------------- + (require 'package) +(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos)) + (not (gnutls-available-p)))) + (proto (if no-ssl "http" "https"))) + (when no-ssl + (warn "\ +Your version of Emacs does not support SSL connections, +which is unsafe because it allows man-in-the-middle attacks. +There are two things you can do about this warning: +1. Install an Emacs version that does support SSL and be safe. +2. Remove this warning from your init file so you won't see it again.")) + ;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired + (add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t) + ;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t) + (when (< emacs-major-version 24) + ;; For important compatibility libraries like cl-lib + (add-to-list 'package-archives (cons "gnu" (concat proto "://elpa.gnu.org/packages/"))))) +(package-initialize) + +(add-to-list 'package-archives + '("melpa-stable" . "https://stable.melpa.org/packages/") t) + +;; This will force any out of date packages to update automatically +(when (not package-archive-contents) + (package-refresh-contents)) + +;; Load the package.el file +(load-file "~/.emacs.d/package.el") ;;-------------------------------------------------------------------------------------- ;; Turn off the startup screen @@ -107,29 +138,6 @@ (setq ibuffer-show-empty-filter-groups nil) - -;;-------------------------------------------------------------------------------------- -;; Enable MELPA -;;-------------------------------------------------------------------------------------- - -(add-to-list 'package-archives - '("melpa" . "https://melpa.org/packages/") t) -(when (< emacs-major-version 24) - ;; For important compatibility libraries like cl-lib - (add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/"))) - -(package-initialize) - -;; This will force any out of date packages to update automatically -(when (not package-archive-contents) - (package-refresh-contents)) - -;;-------------------------------------------------------------------------------------- -;; Theming -;;-------------------------------------------------------------------------------------- - -(load-theme 'material t) - ;;-------------------------------------------------------------------------------------- ;; Default modes ;;-------------------------------------------------------------------------------------- @@ -201,3 +209,9 @@ ;; Autoload the indent function (autoload 'common-lisp-indent-function "cl-indent" "Common Lisp indent.") + +;;-------------------------------------------------------------------------------------- +;; Theming +;;-------------------------------------------------------------------------------------- + +(load-theme 'material t)