From 6524a69f43caf24b5477299beda2f0b672992cb2 Mon Sep 17 00:00:00 2001 From: Marcus Kammer Date: Thu, 14 Nov 2019 10:23:03 +0100 Subject: [PATCH] Move settings --- bundle/custom.el | 149 +++++++++++++++++++++++++++++++++ bundle/os.el | 41 +++++++++ init.el | 214 +++-------------------------------------------- 3 files changed, 203 insertions(+), 201 deletions(-) create mode 100644 bundle/custom.el create mode 100644 bundle/os.el diff --git a/bundle/custom.el b/bundle/custom.el new file mode 100644 index 00000000..62f918f3 --- /dev/null +++ b/bundle/custom.el @@ -0,0 +1,149 @@ +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(auto-save-default nil) + '(backup-directory-alist (quote (("" . "~/.emacs.d/_backup_files")))) + '(blink-cursor-mode nil) + '(cal-html-directory "~/Documents/Diary" t) + '(calendar-date-style (quote iso)) + '(calendar-intermonth-text + (quote + (propertize + (format "%2d" + (car + (calendar-iso-from-absolute + (calendar-absolute-from-gregorian + (list month day year))))) + (quote font-lock-face) + (quote font-lock-function-name-face)))) + '(calendar-week-start-day 1) + '(column-number-mode t) + '(cursor-type (quote (bar . 2))) + '(custom-enabled-themes (quote (berrys))) + '(custom-safe-themes + (quote + ("14c848e2c4a0a11fcd118e2519078aa50bb6020f89035423b40fff421fb24fbd" "cdb4ffdecc682978da78700a461cdc77456c3a6df1c1803ae2dd55c59fa703e3" "9e31aff9afe3c20a33dd966b4c54c6a5151f07659362e4b06bde38ded5370dae" "24fc62afe2e5f0609e436aa2427b396adf9a958a8fa660edbaab5fb13c08aae6" "82358261c32ebedfee2ca0f87299f74008a2e5ba5c502bde7aaa15db20ee3731" "4515feff287a98863b7b7f762197a78a7c2bfb6ec93879e7284dff184419268c" default))) + '(default-frame-alist + (quote + ((font . "Iosevka Term-12") + (undecorated) + (fullscreen) + (left . 5) + (top . 5) + (width . 86) + (height . 45) + (font . "Iosevka Term-13.0") + (vertical-scroll-bars) + (horizontal-scroll-bars) + (menu-bar-lines . 0) + (line-spacing . 2) + (undecorated . t)))) + '(delete-selection-mode t) + '(diary-file "~/Documents/Diary/diary") + '(display-battery-mode t) + '(display-line-numbers nil) + '(display-line-numbers-grow-only t) + '(display-line-numbers-type (quote relative)) + '(display-line-numbers-widen nil) + '(display-time-mode t) + '(display-time-world-list + (quote + (("America/Los_Angeles" "Seattle") + ("America/New_York" "New York") + ("Europe/London" "London") + ("Europe/Paris" "Paris") + ("Asia/Calcutta" "Bangalore") + ("Asia/Tokyo" "Tokyo")))) + '(fill-column 72) + '(font-lock-maximum-decoration t) + '(global-auto-revert-mode t) + '(global-display-line-numbers-mode nil) + '(global-font-lock-mode t) + '(global-hl-line-mode t) + '(icomplete-mode t) + '(indent-tabs-mode nil) + '(inferior-lisp-program (executable-find "sbcl") t) + '(inhibit-startup-screen t) + '(line-number-mode t) + '(line-spacing 3) + '(linum-relative-backend (quote display-line-numbers-mode)) + '(major-mode (quote text-mode)) + '(make-backup-files nil) + '(max-lisp-eval-depth 24000) + '(max-specpdl-size 19500) + '(network-security-level (quote medium)) + '(newsticker-download-logos nil) + '(newsticker-frontend (quote newsticker-plainview)) + '(newsticker-show-descriptions-of-new-items nil) + '(newsticker-url-list-defaults + (quote + (("Emacs Wiki" "https://www.emacswiki.org/emacs?action=rss" nil 3600) + ("Sachachua" "https://sachachua.com/blog/feed/" nil 3600) + ("openSuse News" "https://news.opensuse.org/feed" nil 3600) + ("Phoronix" "https://www.phoronix.com/rss.php" nil 3600) + ("Ubuntu" "https://blog.ubuntu.com/feed" nil 3600) + ("Netzpolitik" "https://logbuch-netzpolitik.de/feed" nil 3600) + ("PBP" "https://pbpython.com/feeds/all.atom.xml" nil 3600) + ("Planet Python" "https://planetpython.org/rss20.xml" nil 3600) + ("lucumr" "http://lucumr.pocoo.org/feed.atom" nil 3600) + ("doughellmann" "https://doughellmann.com/blog/feed/" nil 3600) + ("Metaebene" "https://metaebene.me/feed/" nil 3600) + ("Stack Exchange" "https://emacs.stackexchange.com/feeds" nil 3600) + ("Stallman" "https://stallman.org/rss/rss.xml" nil 3600) + ("Planet Lisp" "http://planet.lisp.org/rss20.xml" nil 3600) + ("Python PEP" "https://www.python.org/dev/peps/peps.rss/" nil 3600)))) + '(nord-comment-brightness 15) + '(nord-region-highlight "snowstorm") + '(nord-uniform-mode-lines t) + '(org-agenda-dim-blocked-tasks nil) + '(org-agenda-files (quote ("~/Documents/Journal"))) + '(org-agenda-inhibit-startup nil) + '(org-agenda-use-tag-inheritance nil) + '(org-babel-load-languages + (quote + ((js . t) + (emacs-lisp . t) + (python . t) + (sqlite . t) + (lisp . t) + (shell . t) + (css . t) + (calc . t)))) + '(org-babel-shell-names + (quote + ("sh" "bash" "csh" "ash" "dash" "ksh" "mksh" "posh"))) + '(org-clock-persist t) + '(org-confirm-babel-evaluate nil) + '(org-default-notes-file "~/Documents/Journal/notes.org") + '(org-html-doctype "html5") + '(org-html-html5-fancy t) + '(org-log-done (quote time)) + '(org-startup-folded nil) + '(org-startup-truncated nil) + '(org-todo-keywords + (quote + ((sequence "TODO" "FEEDBACK" "VERIFY" "|" "DONE" "DELEGATED")))) + '(package-enable-at-startup t) + '(package-selected-packages + (quote + (web-mode zenburn-theme immaterial-theme arc-dark-theme url-http-ntlm syslog-mode org-pomodoro ox-html5slide ox-hugo ox-impress-js ox-ioslide ox-jira ox-json ox-pandoc nov vimish-fold w3 pickle feature-mode elpy elnode ein latex-extra latex-preview-pane docker docker-api docker-cli docker-compose-mode dockerfile-mode python-docstring pytest py-autopep8 pydoc pylint python-info auto-complete-rst sphinx-doc sphinx-frontend sphinx-mode ox-mediawiki ox-minutes ox-nikola cargo racket-mode rust-mode slime gherkin-mode gitlab gitlab-ci-mode org-jira powershell helm gitconfig-mode gitignore-mode ox-rst typescript-mode ## skewer-mode ob-http ob-ipython ob-restclient linum-relative markdown-mode nord-theme restclient request restclient-test yaml-mode magit))) + '(python-shell-interpreter "python3" t) + '(request-log-level (quote debug)) + '(request-message-level (quote debug)) + '(require-final-newline t) + '(restclient-log-request t) + '(restclient-same-buffer-response t) + '(size-indication-mode nil) + '(timeclock-file "~/Documents/Diary/timelog") + '(timeclock-mode-line-display t) + '(tool-bar-mode nil) + '(truncate-lines nil) + '(visible-bell nil)) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(variable-pitch ((t (:family "Noto Sans"))))) diff --git a/bundle/os.el b/bundle/os.el new file mode 100644 index 00000000..49dee386 --- /dev/null +++ b/bundle/os.el @@ -0,0 +1,41 @@ +;; ++++++++++++++++++++ OS +(when (eq system-type 'darwin) + (when (display-graphic-p) + (add-to-list 'default-frame-alist '(ns-transparent-titlebar . t)) + (add-to-list 'default-frame-alist '(ns-appearance . dark)))) + +(when (eq system-type 'windows-nt) + ;; %USERPROFILE%\AppData\Local\Programs\emacs-26.2-x86_64\bin\emacsclientw.exe -c -n -a runemacs.exe + ;; (setq inferior-lisp-program (executable-find "sbcl")) + (setq sbcl-exe (expand-file-name "~/AppData/Local/Programs/Steel Bank Common Lisp/1.4.14/sbcl.exe")) + (setq sbcl-core (expand-file-name "~/AppData/Local/Programs/Steel Bank Common Lisp/1.4.14/sbcl.core")) + (setq slime-lisp-implementations `((sbcl (,sbcl-exe "--core" ,sbcl-core)))) + (setq python-shell-interpreter "python") + (setq inferior-lisp-program "sbcl") + (add-to-list 'load-path (expand-file-name "~/AppData/Roaming/__secrets")) + (cd "~/opt") + (when (display-graphic-p) + (add-to-list 'default-frame-alist '(undecorated . nil)) + (add-to-list 'default-frame-alist '(font . "Iosevka Term-12"))) + (when (string= (system-name) "EVG02667NB") + (add-to-list 'load-path (expand-file-name "~/.emacs.d/__evo")) + (unless (file-directory-p (expand-file-name "~/Documents")) + (let ((docs-path (getenv "DOCS_PATH"))) + (setq org-agenda-files `(,(concat docs-path "\\Journal"))) + (setq org-default-notes-file (concat docs-path "\\Journal\\notes.org")) + (setq cal-html-directory (concat docs-path "\\Diary")) + (setq diary-file (concat docs-path "\\Diary\\diary")) + (setq timeclock-file (concat docs-path "\\Diary\\timelog"))))) + (when (string= (system-name) "XPS-8930") + (setq python-shell-interpreter "ipython"))) + +(when (eq system-type 'gnu/linux) + (setq slime-lisp-implementations '((sbcl ("/usr/bin/sbcl")))) + (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3") + (when (display-graphic-p) + ;; (toggle-frame-fullscreen) + (setq-default line-spacing 3) + (add-to-list 'default-frame-alist '(font . "Iosevka Term-14"))) + (when (string= (system-name) "XPS-13-9380"))) +;; ++++++++++++++++++++ OS +(provide 'os) diff --git a/init.el b/init.el index 16a60abf..bc83b2ab 100755 --- a/init.el +++ b/init.el @@ -1,21 +1,11 @@ -(and (load-file "~/.emacs.d/bundle/lolsmacs.el") - (lolsmacs-init)) -(setq small-font "Iosevka Term-11") -(setq big-font "Iosevka Term-14") -;; start a server, unless one is already running -(when (require 'server nil t) - (unless (server-running-p) - (server-start))) - -;; (add-to-list 'custom-theme-load-path (expand-file-name "~/.emacs.d/bundle/nord-theme/")) (add-to-list 'load-path (expand-file-name "~/.emacs.d/bundle")) +(require 'package) ;; Added by Package.el. This must come before configurations of ;; installed packages. Don't delete this line. If you don't want it, ;; just comment it out by adding a semicolon to the start of the line. ;; You may delete these explanatory comments. -(require 'package) (let* ((no-ssl (and (memq system-type '(windows-nt ms-dos)) (not (gnutls-available-p)))) (proto (if no-ssl "http" "https"))) @@ -34,156 +24,6 @@ There are two things you can do about this warning: (add-to-list 'package-archives (cons "gnu" (concat proto "://elpa.gnu.org/packages/"))))) (package-initialize) -(custom-set-faces - ;; custom-set-faces was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - '(variable-pitch ((t (:family "Noto Sans"))))) - -(custom-set-variables - ;; custom-set-variables was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - '(auto-save-default nil) - '(backup-directory-alist (quote (("" . "~/.emacs.d/_backup_files")))) - '(blink-cursor-mode nil) - '(cal-html-directory "~/Documents/Diary" t) - '(calendar-date-style (quote iso)) - '(calendar-intermonth-text - (quote - (propertize - (format "%2d" - (car - (calendar-iso-from-absolute - (calendar-absolute-from-gregorian - (list month day year))))) - (quote font-lock-face) - (quote font-lock-function-name-face)))) - '(calendar-week-start-day 1) - '(column-number-mode t) - '(custom-enabled-themes (quote (nord))) - '(custom-safe-themes - (quote - ("cdb4ffdecc682978da78700a461cdc77456c3a6df1c1803ae2dd55c59fa703e3" "9e31aff9afe3c20a33dd966b4c54c6a5151f07659362e4b06bde38ded5370dae" "24fc62afe2e5f0609e436aa2427b396adf9a958a8fa660edbaab5fb13c08aae6" "82358261c32ebedfee2ca0f87299f74008a2e5ba5c502bde7aaa15db20ee3731" "4515feff287a98863b7b7f762197a78a7c2bfb6ec93879e7284dff184419268c" default))) - '(default-frame-alist - (quote - ((fullscreen . maximized) - (left . 5) - (top . 5) - (width . 195) - (height . 35) - (font . "Iosevka Term-13.0") - (vertical-scroll-bars) - (horizontal-scroll-bars) - (menu-bar-lines . 0) - (line-spacing . 2) - (undecorated . t)))) - '(delete-selection-mode t) - '(diary-file "~/Documents/Diary/diary") - '(display-battery-mode t) - '(display-line-numbers nil) - '(display-line-numbers-grow-only t) - '(display-line-numbers-type (quote relative)) - '(display-line-numbers-widen nil) - '(display-time-mode t) - '(display-time-world-list - (quote - (("America/Los_Angeles" "Seattle") - ("America/New_York" "New York") - ("Europe/London" "London") - ("Europe/Paris" "Paris") - ("Asia/Calcutta" "Bangalore") - ("Asia/Tokyo" "Tokyo")))) - '(fill-column 72) - '(font-lock-maximum-decoration t) - '(global-auto-revert-mode t) - '(global-display-line-numbers-mode nil) - '(global-font-lock-mode t) - '(global-hl-line-mode t) - '(icomplete-mode t) - '(indent-tabs-mode nil) - '(inferior-lisp-program (executable-find "sbcl") t) - '(inhibit-startup-screen t) - '(line-number-mode t) - '(line-spacing 3) - '(linum-relative-backend (quote display-line-numbers-mode)) - '(major-mode (quote text-mode)) - '(make-backup-files nil) - '(max-lisp-eval-depth 24000) - '(max-specpdl-size 19500) - '(network-security-level (quote medium)) - '(newsticker-download-logos nil) - '(newsticker-frontend (quote newsticker-plainview)) - '(newsticker-show-descriptions-of-new-items nil) - '(newsticker-url-list-defaults - (quote - (("Emacs Wiki" "https://www.emacswiki.org/emacs?action=rss" nil 3600) - ("Sachachua" "https://sachachua.com/blog/feed/" nil 3600) - ("openSuse News" "https://news.opensuse.org/feed" nil 3600) - ("Phoronix" "https://www.phoronix.com/rss.php" nil 3600) - ("Ubuntu" "https://blog.ubuntu.com/feed" nil 3600) - ("Netzpolitik" "https://logbuch-netzpolitik.de/feed" nil 3600) - ("PBP" "https://pbpython.com/feeds/all.atom.xml" nil 3600) - ("Planet Python" "https://planetpython.org/rss20.xml" nil 3600) - ("lucumr" "http://lucumr.pocoo.org/feed.atom" nil 3600) - ("doughellmann" "https://doughellmann.com/blog/feed/" nil 3600) - ("Metaebene" "https://metaebene.me/feed/" nil 3600) - ("Stack Exchange" "https://emacs.stackexchange.com/feeds" nil 3600) - ("Stallman" "https://stallman.org/rss/rss.xml" nil 3600) - ("Planet Lisp" "http://planet.lisp.org/rss20.xml" nil 3600) - ("Python PEP" "https://www.python.org/dev/peps/peps.rss/" nil 3600)))) - '(nord-comment-brightness 15) - '(nord-region-highlight "snowstorm") - '(nord-uniform-mode-lines t) - '(org-agenda-dim-blocked-tasks nil) - '(org-agenda-files (quote ("~/Documents/Journal"))) - '(org-agenda-inhibit-startup nil) - '(org-agenda-use-tag-inheritance nil) - '(org-babel-load-languages - (quote - ((js . t) - (emacs-lisp . t) - (python . t) - (sqlite . t) - (lisp . t) - (shell . t) - (css . t) - (calc . t)))) - '(org-babel-shell-names - (quote - ("sh" "bash" "csh" "ash" "dash" "ksh" "mksh" "posh"))) - '(org-clock-persist t) - '(org-confirm-babel-evaluate nil) - '(org-default-notes-file "~/Documents/Journal/notes.org") - '(org-html-doctype "html5") - '(org-html-html5-fancy t) - '(org-log-done (quote time)) - '(org-startup-folded nil) - '(org-startup-truncated nil) - '(org-todo-keywords - (quote - ((sequence "TODO" "FEEDBACK" "VERIFY" "|" "DONE" "DELEGATED")))) - '(package-enable-at-startup t) - '(package-selected-packages - (quote - (web-mode zenburn-theme immaterial-theme arc-dark-theme url-http-ntlm syslog-mode org-pomodoro ox-html5slide ox-hugo ox-impress-js ox-ioslide ox-jira ox-json ox-pandoc nov vimish-fold w3 pickle feature-mode elpy elnode ein latex-extra latex-preview-pane docker docker-api docker-cli docker-compose-mode dockerfile-mode python-docstring pytest py-autopep8 pydoc pylint python-info auto-complete-rst sphinx-doc sphinx-frontend sphinx-mode ox-mediawiki ox-minutes ox-nikola cargo racket-mode rust-mode slime gherkin-mode gitlab gitlab-ci-mode org-jira powershell helm gitconfig-mode gitignore-mode ox-rst typescript-mode ## skewer-mode ob-http ob-ipython ob-restclient linum-relative markdown-mode nord-theme restclient request restclient-test yaml-mode magit))) - '(python-shell-interpreter "python3" t) - '(request-log-level (quote debug)) - '(request-message-level (quote debug)) - '(require-final-newline t) - '(restclient-log-request t) - '(restclient-same-buffer-response t) - '(size-indication-mode nil) - '(timeclock-file "~/Documents/Diary/timelog") - '(timeclock-mode-line-display t) - '(tool-bar-mode nil) - '(truncate-lines nil) - '(visible-bell nil)) - -(require 'markdown-mode) -(require 'linum-relative) (require 'fill-column-indicator) (require 'tls) (require 'request) @@ -191,6 +31,18 @@ There are two things you can do about this warning: (require 'json) (require 'url) +(setq custom-file "~/.emacs.d/bundle/custom.el") +(load custom-file :noerror) + +(setq small-font "Iosevka Term-11") +(setq big-font "Iosevka Term-14") + +(require 'os) +;; start a server, unless one is already running +(when (require 'server nil t) + (unless (server-running-p) + (server-start))) + ;; UTF-8 FTW (prefer-coding-system 'utf-8) (set-keyboard-coding-system 'utf-8) @@ -205,46 +57,6 @@ There are two things you can do about this warning: ;; I got sick of typing "yes" (defalias 'yes-or-no-p 'y-or-n-p) -;; ++++++++++++++++++++ OS -(when (eq system-type 'darwin) - (when (display-graphic-p) - (add-to-list 'default-frame-alist '(ns-transparent-titlebar . t)) - (add-to-list 'default-frame-alist '(ns-appearance . dark)))) - -(when (eq system-type 'windows-nt) - ;; %USERPROFILE%\AppData\Local\Programs\emacs-26.2-x86_64\bin\emacsclientw.exe -c -n -a runemacs.exe - ;; (setq inferior-lisp-program (executable-find "sbcl")) - (setq sbcl-exe (expand-file-name "~/AppData/Local/Programs/Steel Bank Common Lisp/1.4.14/sbcl.exe")) - (setq sbcl-core (expand-file-name "~/AppData/Local/Programs/Steel Bank Common Lisp/1.4.14/sbcl.core")) - (setq slime-lisp-implementations `((sbcl (,sbcl-exe "--core" ,sbcl-core)))) - (setq python-shell-interpreter "python") - (setq inferior-lisp-program "sbcl") - (add-to-list 'load-path (expand-file-name "~/AppData/Roaming/__secrets")) - (cd "~/opt") - (when (display-graphic-p) - (add-to-list 'default-frame-alist '(undecorated . nil)) - (add-to-list 'default-frame-alist '(font . "Iosevka Term-12"))) - (when (string= (system-name) "EVG02667NB") - (add-to-list 'load-path (expand-file-name "~/.emacs.d/__evo")) - (unless (file-directory-p (expand-file-name "~/Documents")) - (let ((docs-path (getenv "DOCS_PATH"))) - (setq org-agenda-files `(,(concat docs-path "\\Journal"))) - (setq org-default-notes-file (concat docs-path "\\Journal\\notes.org")) - (setq cal-html-directory (concat docs-path "\\Diary")) - (setq diary-file (concat docs-path "\\Diary\\diary")) - (setq timeclock-file (concat docs-path "\\Diary\\timelog"))))) - (when (string= (system-name) "XPS-8930") - (setq python-shell-interpreter "ipython"))) - -(when (eq system-type 'gnu/linux) - (setq slime-lisp-implementations '((sbcl ("/usr/bin/sbcl")))) - (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3") - (when (display-graphic-p) - ;; (toggle-frame-fullscreen) - (setq-default line-spacing 3) - (add-to-list 'default-frame-alist '(font . "Iosevka Term-14"))) - (when (string= (system-name) "XPS-13-9380"))) -;; ++++++++++++++++++++ OS (defun copy-whole-buffer () "Copy entire buffer to clipboard"