Merge branch 'cleanup-dot-emacs-dir' of gitlab.com:marcuskammer/emacs.d into cleanup-dot-emacs-dir

This commit is contained in:
Marcus Kammer 2020-07-17 17:44:12 +02:00
commit 59fc8881f7
9 changed files with 287 additions and 123 deletions

41
.profile Normal file
View file

@ -0,0 +1,41 @@
# Sample .profile for SuSE Linux
# rewritten by Christian Steinruecken <cstein@suse.de>
#
# This file is read each time a login shell is started.
# All other interactive shells will only read .bashrc; this is particularly
# important for language settings, see below.
test -z "$PROFILEREAD" && . /etc/profile || true
# Most applications support several languages for their output.
# To make use of this feature, simply uncomment one of the lines below or
# add your own one (see /usr/share/locale/locale.alias for more codes)
# This overwrites the system default set in /etc/sysconfig/language
# in the variable RC_LANG.
#
#export LANG=de_DE.UTF-8 # uncomment this line for German output
#export LANG=fr_FR.UTF-8 # uncomment this line for French output
#export LANG=es_ES.UTF-8 # uncomment this line for Spanish output
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
# Some people don't like fortune. If you uncomment the following lines,
# you will have a fortune each time you log in ;-)
#if [ -x /usr/bin/fortune ] ; then
# echo
# /usr/bin/fortune
# echo
#fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi
export PATH="$HOME/.cargo/bin:$PATH"
export PATH="$HOME/.npm-packages/bin:$PATH"

1
backup_home.sh Executable file
View file

@ -0,0 +1 @@
rsync -rltDv --log-file=~/backup_home.log /home/marcus /run/media/marcus/Lacie-2TB/XPS9380/

1
battery.sh Executable file
View file

@ -0,0 +1 @@
upower -i /org/freedesktop/UPower/devices/battery_BAT0

View file

@ -10,32 +10,53 @@
'(custom-enabled-themes (quote (nord)))
'(custom-safe-themes
(quote
("6e933f1668e124ec17fc7b6547f65ba760e06efb568a6c8091c600c67827e592" "7f6d4aebcc44c264a64e714c3d9d1e903284305fd7e319e7cb73345a9994f5ef" default)))
("37768a79b479684b0756dec7c0fc7652082910c37d8863c35b702db3f16000f8" "06bf0822aa77ea498bbd6038b59ad96fca43b272b49b18ab024218881ba134d1" "6e933f1668e124ec17fc7b6547f65ba760e06efb568a6c8091c600c67827e592" "7f6d4aebcc44c264a64e714c3d9d1e903284305fd7e319e7cb73345a9994f5ef" default)))
'(default-frame-alist
(quote
((undecorated . t)
(font . "Iosevka Term-12")
((font . "Fira Code-11")
(fullscreen . maximized)
(alpha . 98))))
(alpha . 100)
(undecorated . t))))
'(delete-selection-mode nil)
'(elpy-modules
(quote
(elpy-module-company elpy-module-eldoc elpy-module-flymake elpy-module-folding elpy-module-pyvenv elpy-module-yasnippet elpy-module-django elpy-module-sane-defaults)))
'(fci-rule-color "#4C566A")
'(global-hl-line-mode t)
'(indent-tabs-mode nil)
'(inhibit-startup-buffer-menu t)
'(initial-buffer-choice "~/Documents/Journal/notes.org")
'(initial-buffer-choice "~/Documents/journal/notes.org")
'(menu-bar-mode nil)
'(olivetti-body-width 73)
'(org-adapt-indentation t)
'(org-agenda-files (quote ("~/Documents/Journal")))
'(org-agenda-files (quote ("~/Documents/journal")))
'(org-babel-load-languages
(quote
((js . t)
(gnuplot . t)
(emacs-lisp . t)
(python . t)
(sqlite . t)
(lisp . t)
(shell . t)
(css . t)
(calc . t)
(plantuml . t)
(dot . t))))
'(org-babel-python-command "python3")
'(org-default-notes-file "~/Documents/Journal/notes.org")
'(org-default-notes-file "~/Documents/journal/notes.org")
'(org-html-htmlize-output-type nil)
'(org-modules
(quote
(ol-bbdb ol-bibtex ol-docview ol-eww ol-gnus ol-info ol-irc ol-mhe ol-rmail org-tempo ol-w3m orgtbl-sqlinsert org-toc)))
(ol-bbdb ol-docview ol-eww ol-gnus ol-info ol-irc ol-mhe ol-rmail org-tempo ol-w3m orgtbl-sqlinsert)))
'(org-plantuml-jar-path "~/.local/bin/plantuml.jar")
'(package-enable-at-startup t)
'(package-selected-packages
(quote
(lua-mode nordless-theme use-package elpy colorless-themes nord-theme org toc-org ox-reveal ace-window htmlize ivy magit)))
(nov markdown-mode markdown-preview-mode olivetti web-mode js2-mode slime flymake-racket racket-mode yaml-mode lua-mode nordless-theme use-package elpy colorless-themes nord-theme org toc-org ox-reveal ace-window htmlize ivy magit)))
'(python-shell-interpreter "python3")
'(scroll-bar-mode nil)
'(tool-bar-mode nil)
'(tramp-default-method "ssh"))
(custom-set-faces
;; custom-set-faces was added by Custom.
@ -43,4 +64,5 @@
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(highlight-indentation-current-column-face ((t (:inherit hl-line))))
'(highlight-indentation-face ((t (:inherit hl-line)))))
'(highlight-indentation-face ((t (:inherit hl-line))))
'(variable-pitch ((t (:height 1.1 :family "Sans Serif")))))

View file

@ -8,22 +8,50 @@
'(default-frame-alist
(quote
((vertical-scroll-bars)
(font . "Iosevka Term-12")
(fullscreen . maximized)
(alpha . 98))))
(font . "Fira Code-11")
(fullscreen . maximized))))
'(delete-by-moving-to-trash t)
'(display-line-numbers-grow-only t)
'(elpy-modules
(quote
(elpy-module-company elpy-module-eldoc elpy-module-flymake elpy-module-pyvenv elpy-module-yasnippet elpy-module-sane-defaults)))
'(elpy-test-runner (quote elpy-test-pytest-runner))
'(geiser-default-implementation (quote racket))
'(horizontal-scroll-bar-mode nil)
'(inhibit-startup-buffer-menu t)
'(initial-buffer-choice "d:/syncplicity/Marcus.Kammer/documents/Journal/notes.org")
'(initial-frame-alist nil)
'(line-spacing nil)
'(ls-lisp-dirs-first t)
'(menu-bar-mode nil)
'(mode-line-format
(quote
("-" mode-line-mule-info mode-line-modified mode-line-frame-identification mode-line-buffer-identification " " mode-line-position mode-line-modes
(which-func-mode
("" which-func-format "--"))
(global-mode-string
("--" global-mode-string))
"-%-")))
'(nov-unzip-program
"C:\\Users\\Marcus.Kammer\\AppData\\Local\\Programs\\unzip-5.51-1-bin\\bin\\unzip.exe")
'(olivetti-body-width 90)
'(olivetti-lighter " Olv")
'(olivetti-minimum-body-width 80)
'(olivetti-mode-hook nil)
'(org-agenda-files (quote ("d:/syncplicity/Marcus.Kammer/documents/Journal/")))
'(org-babel-load-languages
(quote
((js . t)
(gnuplot . t)
(emacs-lisp . t)
(python . t)
(sqlite . t)
(lisp . t)
(shell . t)
(css . t)
(calc . t)
(plantuml . t)
(dot . t))))
'(org-clock-out-remove-zero-time-clocks t)
'(org-default-notes-file "d:/syncplicity/Marcus.Kammer/documents/Journal/notes.org")
'(org-duration-format (quote h:mm))
@ -34,7 +62,7 @@
"c:/Users/Marcus.Kammer/AppData/Local/Programs/plantuml/plantuml.jar")
'(package-selected-packages
(quote
(yaml-mode olivetti elpy use-package nord-theme nordless-theme org toc-org ox-reveal ace-window htmlize ivy magit)))
(ein projectile nov markdown-preview-mode request rust-mode sphinx-frontend sphinx-mode racket-mode geiser slime web-mode js2-mode markdown-mode yaml-mode olivetti elpy use-package nord-theme nordless-theme org toc-org ox-reveal ace-window htmlize ivy magit)))
'(python-indent-guess-indent-offset nil)
'(python-shell-interpreter "ipython")
'(ring-bell-function (quote ignore))
@ -46,4 +74,5 @@
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(highlight-indentation-current-column-face ((t (:inherit hl-line))))
'(highlight-indentation-face ((t (:inherit hl-line)))))
'(highlight-indentation-face ((t (:inherit hl-line))))
'(variable-pitch ((t (:height 1.1 :foundry "outline" :family "Noto Sans")))))

View file

@ -1,6 +1,7 @@
;; Auto-generated file; don't edit
((:url "https://docs.cherrypy.org/en/latest/_sources/index.rst.txt" :title "cherrypy plain text" :time "Fri Mar 6 10:36:27 2020")
((:url "https://doc.opensuse.org/" :title "Overview of guides | openSUSE Documentation" :time "Tue Jun 30 18:51:51 2020")
(:url "http://www.gigamonkeys.com/book/practical-a-simple-database.html" :title "Practical: A Simple Database" :time "Tue Jun 30 18:47:50 2020")
(:url "https://docs.cherrypy.org/en/latest/_sources/index.rst.txt" :title "cherrypy plain text" :time "Fri Mar 6 10:36:27 2020")
(:url "https://docs.cherrypy.org/en/latest/pkg/cherrypy.lib.html" :title "cherrypy.lib package — CherryPy 18.5.1.dev7+g242dc04f.d20200224 documentation" :time "Thu Mar 5 14:15:19 2020")
(:url "https://docs.cherrypy.org/en/latest/" :title "CherryPy — A Minimalist Python Web Framework — CherryPy 18.5.1.dev7+g242dc04f.d20200224 documentation" :time "Thu Mar 5 14:03:05 2020")
(:url "https://docs.ansible.com/ansible/latest/index.html" :title "Ansible Documentation — Ansible Documentation" :time "Sat Mar 7 11:15:52 2020")

268
init.el
View file

@ -5,121 +5,170 @@
(server-start))
;; PACKAGE
(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)
(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)
;; OS SETTINGS
(when (eq system-type 'gnu/linux)
(setq custom-file "~/.emacs.d/bundle/custom_gnu.el"))
(when (eq system-type 'gnu/linux)
(setq custom-file "~/.emacs.d/bundle/custom_gnu.el"))
(when (eq system-type 'windows-nt)
(setq custom-file "~/.emacs.d/bundle/custom_win32.el")
(add-to-list 'load-path (expand-file-name "~/AppData/Roaming/__secrets"))
(cd "~/opt")
(when (string= (system-name) "EVG02667NB")
(setq custom-file "~/.emacs.d/bundle/custom_win32_EVG02667NB.el"))
(when (string= (system-name) "XPS-8930")))
(when (eq system-type 'windows-nt)
(setq custom-file "~/.emacs.d/bundle/custom_win32.el")
(add-to-list 'load-path (expand-file-name "~/AppData/Roaming/__secrets"))
(cd "~/opt")
(when (string= (system-name) "EVG02667NB")
(setq custom-file "~/.emacs.d/bundle/custom_win32_EVG02667NB.el"))
(when (string= (system-name) "XPS-8930")))
;; CUSTOM_FILE
(load custom-file :noerror)
(load custom-file :noerror)
;; DISPLAY SETTINGS
;; General userinterface and appearance
(global-font-lock-mode t) ; Color enabled
(global-prettify-symbols-mode t) ; Prettify symbols
(global-hl-line-mode 1) ; Highlight cursor line
(global-whitespace-mode -1) ; Show whitespace globally
(show-paren-mode 1) ; Visual matching parens
(global-display-line-numbers-mode -1) ; Display line numbers
;; Mode line specific
(column-number-mode 1) ; Display column number in the mode line
(size-indication-mode -1) ; Display buffer size in the mode line
(line-number-mode 1) ; Display line number in the mode line
(display-battery-mode -1) ; Display battery status in the mode line
(display-time-mode 1) ; Display time in the mode line
;; General userinterface and appearance
(global-font-lock-mode t) ; Color enabled
(global-prettify-symbols-mode t) ; Prettify symbols
(global-hl-line-mode 1) ; Highlight cursor line
(global-whitespace-mode -1) ; Show whitespace globally
(show-paren-mode 1) ; Visual matching parens
(global-display-line-numbers-mode -1) ; Display line numbers
;; Mode line specific
(column-number-mode 1) ; Display column number in the mode line
(size-indication-mode -1) ; Display buffer size in the mode line
(line-number-mode 1) ; Display line number in the mode line
(display-battery-mode -1) ; Display battery status in the mode line
(display-time-mode 1) ; Display time in the mode line
(load-theme 'nord t)
(load-theme 'nord t)
;; GLOBAL KEYS
(global-set-key (kbd "C-c l") 'org-store-link)
(global-set-key (kbd "C-c a") 'org-agenda)
(global-set-key (kbd "C-c c") 'org-capture)
(global-set-key (kbd "C-c b") 'org-switchb)
;; (global-set-key (kbd "C-c C-x m") 'org-pomodoro)
(global-set-key (kbd "C-x g") 'magit-status)
(global-set-key (kbd "C-x M-g") 'magit-dispatch)
(global-set-key (kbd "M-i") 'imenu)
(global-set-key (kbd "C-c n") 'newsticker-start)
(global-set-key (kbd "M-o") 'ace-window)
(global-set-key (kbd "C-c l") 'org-store-link)
(global-set-key (kbd "C-c a") 'org-agenda)
(global-set-key (kbd "C-c c") 'org-capture)
(global-set-key (kbd "C-c b") 'org-switchb)
;; (global-set-key (kbd "C-c C-x m") 'org-pomodoro)
(global-set-key (kbd "C-x g") 'magit-status)
(global-set-key (kbd "C-x M-g") 'magit-dispatch)
(global-set-key (kbd "M-i") 'imenu)
(global-set-key (kbd "C-c n") 'newsticker-start)
(global-set-key (kbd "M-o") 'ace-window)
;; UTF-8 FTW
(prefer-coding-system 'utf-8)
(set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(setq default-buffer-file-coding-system 'utf-8)
(defalias 'yes-or-no-p 'y-or-n-p)
(prefer-coding-system 'utf-8)
(set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(setq default-buffer-file-coding-system 'utf-8)
(defalias 'yes-or-no-p 'y-or-n-p)
;; PACKAGES
(ivy-mode 1)
(ivy-mode 1)
(use-package elpy
:ensure t
:init
(elpy-enable))
(use-package nov
:ensure t
:config
(setq nov-text-width 80))
(use-package elpy
:ensure t
:init
(elpy-enable))
(use-package js2-mode
:ensure t
:interpreter (("node" . js2-mode))
:bind (:map js2-mode-map ("C-c C-p" . js2-print-json-path))
:mode "\\.\\(js\\|json\\)$"
:config
(add-hook 'js-mode-hook 'js2-minor-mode)
(setq js2-basic-offset 2
js2-highlight-level 3
js2-mode-show-parse-errors nil
js2-mode-show-strict-warnings nil))
(use-package web-mode
:ensure t
:mode "\\.html?\\'"
:init
(dolist (hook '(emmet-mode ac-emmet-html-setup ac-emmet-css-setup))
(add-hook 'web-mode-hook hook))
:config
(setq web-mode-markup-indent-offset 2
web-mode-css-indent-offset 2
web-mode-code-indent-offset 2
web-mode-enable-auto-pairing nil
web-mode-enable-auto-closing t
web-mode-enable-current-element-highlight t
web-mode-enable-current-column-highlight t
web-mode-ac-sources-alist
'(("css" . (ac-source-css-property ac-source-emmet-css-snippets))
("html" . (ac-source-emmet-html-aliases
ac-source-emmet-html-snippets))))
(add-hook 'web-mode-before-auto-complete-hooks
'(lambda ()
(let ((web-mode-cur-language (web-mode-language-at-pos)))
(if (string= web-mode-cur-language "css")
(setq emmet-use-css-transform t)
(setq emmet-use-css-transform nil))))))
(use-package slime
:ensure t
:config (setq inferior-lisp-program (executable-find "sbcl")))
(add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))
;; ORG_MODE SETTINGS
(setq org-agenda-dim-blocked-tasks nil
org-agenda-inhibit-startup nil
org-babel-load-languages (quote
((js . t)
(gnuplot . t)
(emacs-lisp . t)
(python . t)
(sqlite . t)
(lisp . t)
(shell . t)
(css . t)
(calc . t)
(plantuml . t)
(dot . t)))
org-babel-shell-names (quote ("sh" "bash" "csh" "ash" "dash" "ksh" "mksh" "posh"))
org-clock-persist t
org-confirm-babel-evaluate nil
org-html-doctype "html5"
org-html-html5-fancy t
org-log-done (quote time)
org-startup-folded t
org-startup-truncated nil
org-todo-keywords (quote ((sequence "TODO" "FEEDBACK" "VERIFY" "|" "DONE" "DELEGATED")))
org-use-property-inheritance nil)
(org-clock-persistence-insinuate)
(setq org-agenda-dim-blocked-tasks nil
org-agenda-inhibit-startup nil
org-babel-load-languages (quote
((js . t)
(gnuplot . t)
(emacs-lisp . t)
(python . t)
(sqlite . t)
(lisp . t)
(shell . t)
(css . t)
(calc . t)
(plantuml . t)
(dot . t)))
org-babel-shell-names (quote ("sh" "bash" "csh" "ash" "dash" "ksh" "mksh" "posh"))
org-clock-persist t
org-confirm-babel-evaluate nil
org-html-doctype "html5"
org-html-html5-fancy t
org-log-done (quote time)
org-startup-folded t
org-startup-truncated nil
org-todo-keywords (quote ((sequence "TODO" "FEEDBACK" "VERIFY" "|" "DONE" "DELEGATED")))
org-use-property-inheritance nil)
(org-clock-persistence-insinuate)
;; HOOKS
(add-hook 'diary-display-hook 'fancy-diary-display)
(add-hook 'today-visible-calendar-hook 'calendar-mark-today)
(add-hook 'write-file-hooks 'delete-trailing-whitespace)
(add-hook 'org-mode-hook 'turn-on-auto-fill)
(add-hook 'rst-mode-hook 'turn-on-orgstruct)
(add-hook 'newsticker-mode-hook 'imenu-add-menubar-index)
(add-to-list 'auto-mode-alist '("\\.tmpl\\'" . web-mode))
(add-hook 'diary-display-hook 'fancy-diary-display)
(add-hook 'today-visible-calendar-hook 'calendar-mark-today)
(add-hook 'write-file-hooks 'delete-trailing-whitespace)
(add-hook 'org-mode-hook 'turn-on-auto-fill)
(add-hook 'rst-mode-hook 'turn-on-orgstruct)
(add-hook 'newsticker-mode-hook 'imenu-add-menubar-index)
(add-to-list 'auto-mode-alist '("\\.tmpl\\'" . web-mode))
;; DIARY
(setq cal-html-directory "~/Documents/Diary"
@ -146,8 +195,27 @@
timeclock-file (concat docs-path "\\Diary\\timelog")))))
(provide 'calendar-settings)
;; Local Variables:
;; mode: emacs-lisp
;; coding: utf-8
;; fill-column: 79
;; End:
(put 'narrow-to-region 'disabled nil)
(put 'narrow-to-page 'disabled nil)
;; SBCL
(defun win-set-sbcl ()
;; %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")
sbcl-core (expand-file-name "~/AppData/Local/Programs/Steel Bank Common Lisp/1.4.14/sbcl.core")
inferior-lisp-program "sbcl"
slime-lisp-implementations `((sbcl (,sbcl-exe "--core" ,sbcl-core)))))
(when (eq system-type 'windows-nt)
(win-set-sbcl))
(defun mk-write-mode-enable ()
(setq olivetti-body-width 73)
(setq mode-line-format nil)
(olivetti-mode))
(defun mk-write-mode-disable ()
(setq mode-line-format '(("-" mode-line-mule-info mode-line-modified mode-line-frame-identification mode-line-buffer-identification " " mode-line-position mode-line-modes (which-func-mode ("" which-func-format "--")) (global-mode-string ("--" global-mode-string)) "-%-")))
(olivetti-mode)
(defvar mode-line-format-current
(symbol-value 'mode-line-format)))

View file

@ -6,9 +6,9 @@
#: individual font faces and even specify special fonts for particular
#: characters.
font_family Iosevka Term Medium
bold_font Iosevka Term Bold
italic_font Iosevka Term Medium Italic
font_family Fira Code
bold_font Fira Code Bold
italic_font Fira Code Italic
#: You can specify different fonts for the bold/italic/bold-italic
#: variants. To get a full list of supported fonts use the `kitty
@ -22,7 +22,7 @@ italic_font Iosevka Term Medium Italic
#: italic_font Operator Mono Book Italic
#: bold_italic_font Operator Mono Medium Italic
font_size 13.0
font_size 12.0
#: Font size (in pts)
@ -260,7 +260,7 @@ sync_to_monitor yes
#: Terminal bell {{{
enable_audio_bell yes
enable_audio_bell no
#: Enable/disable the audio bell. Useful in environments that require
#: silence.
@ -373,7 +373,7 @@ inactive_text_alpha 1.0
#: Fade the text in inactive windows by the specified amount (a number
#: between zero and one, with zero being fully faded).
hide_window_decorations no
hide_window_decorations yes
#: Hide the window decorations (title-bar and window borders). Whether
#: this works and exactly what effect it has depends on the window

1
wifi.sh Executable file
View file

@ -0,0 +1 @@
sudo iwconfig wlp2s0 | grep -i --color quality