commit 52e2d868b47e370c131dbe4bac848be11fb0b3f2 Author: handi Date: Fri Apr 3 16:52:03 2026 +0200 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ac36e06 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +elpa/ +auto-save-list/ +backups/ +*.elc +custom.el +eln-cache/ +url/ \ No newline at end of file diff --git a/init-custom.el b/init-custom.el new file mode 100644 index 0000000..e8211d9 --- /dev/null +++ b/init-custom.el @@ -0,0 +1,12 @@ +(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. + '(package-selected-packages '(doom-themes markdown-mode nord-theme olivetti))) +(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. + ) diff --git a/init.el b/init.el new file mode 100644 index 0000000..c55cf26 --- /dev/null +++ b/init.el @@ -0,0 +1,97 @@ +;; ~/.emacs.d/init.el + +(add-to-list 'load-path "~/.emacs.d/lisp") + +(setq custom-file "~/.emacs.d/custom.el") +(load custom-file 'noerror 'nomessage) + +(require 'init-packages) +(require 'init-ui) +(require 'init-org) +(require 'init-markdown) + + + + + +;; ;;; Package-System (optional, aber sinnvoll) +;; (require 'package) +;; (setq package-archives +;; '(("gnu" . "https://elpa.gnu.org/packages/") +;; ("nongnu". "https://elpa.nongnu.org/nongnu/") +;; ("melpa" . "https://melpa.org/packages/"))) +;; (package-initialize) + +;; (require 'doom-themes) +;; (load-theme 'doom-badger t) +;; (setq select-enable-clipboard t) +;; (setq select-enable-primary t) +;; ;;(load-theme 'nord t) + +;; ;; Hintergrund dunkler / neutraler +;; (set-face-background 'default "#1e1e1e") +;; (set-face-background 'fringe "#1e1e1e") +;; (set-face-background 'region "#3a3a3a") + +;; (menu-bar-mode -1) +;; (tool-bar-mode -1) +;; (scroll-bar-mode -1) +;; (electric-pair-mode 1) +;; (xterm-mouse-mode 1) + + +;; ;;; Kleines, ruhiges UI +;; (setq inhibit-startup-screen t) +;; (setq initial-scratch-message nil) + +;; ;;; Besseres Schreib-Layout +;; (defun my/text-indentation-setup () +;; "Angenehme Einrückung und Umbrüche für Text." +;; (setq-local left-margin-width 2) +;; (setq-local right-margin-width 0) +;; (visual-line-mode 1) +;; (setq-local word-wrap t) +;; (set-window-buffer nil (current-buffer))) + +;; (add-hook 'text-mode-hook #'my/text-indentation-setup) +;; (add-hook 'org-mode-hook #'my/text-indentation-setup) + +;; ;;; Org: echte Einrückung unter Überschriften +;; (setq org-adapt-indentation t) + +;; (setq org-startup-indented t) +;; (add-hook 'org-mode-hook #'org-indent-mode) +;; (add-hook 'markdown-mode-hook #'outline-minor-mode) +;; (setq markdown-fontify-code-blocks-natively t) +;; (setq markdown-enable-math t) +;; (setq markdown-hide-markup t) + + +;; ;;; Markdown-Einstellungen +;; (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. +;; '(package-selected-packages '(doom-themes markdown-mode nord-theme olivetti))) +;; (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. +;; ) + + +;; (setq select-enable-clipboard t) + +;; ;; Wayland Clipboard Support via wl-copy / wl-paste +;; (setq interprogram-cut-function +;; (lambda (text &optional push) +;; (let ((process-connection-type nil)) +;; (let ((proc (start-process "wl-copy" nil "wl-copy"))) +;; (process-send-string proc text) +;; (process-send-eof proc))))) + +;; (setq interprogram-paste-function +;; (lambda () +;; (shell-command-to-string "wl-paste -n"))) diff --git a/init.el~ b/init.el~ new file mode 100644 index 0000000..84e85fd --- /dev/null +++ b/init.el~ @@ -0,0 +1,97 @@ +;; ~/.emacs.d/init.el + +;; (add-to-list 'load-path "~/.emacs.d/lisp") + +;; (setq custom-file "~/.emacs.d/custom.el") +;; (load custom-file 'noerror 'nomessage) + +;; (require 'init-packages) +;; (require 'init-ui) +;; (require 'init-org) +;; (require 'init-markdown) + + + + + +;;; Package-System (optional, aber sinnvoll) +(require 'package) +(setq package-archives + '(("gnu" . "https://elpa.gnu.org/packages/") + ("nongnu". "https://elpa.nongnu.org/nongnu/") + ("melpa" . "https://melpa.org/packages/"))) +(package-initialize) + +(require 'doom-themes) +(load-theme 'doom-badger t) +(setq select-enable-clipboard t) +(setq select-enable-primary t) +;;(load-theme 'nord t) + +;; Hintergrund dunkler / neutraler +(set-face-background 'default "#1e1e1e") +(set-face-background 'fringe "#1e1e1e") +(set-face-background 'region "#3a3a3a") + +(menu-bar-mode -1) +(tool-bar-mode -1) +(scroll-bar-mode -1) +(electric-pair-mode 1) +(xterm-mouse-mode 1) + + +;;; Kleines, ruhiges UI +(setq inhibit-startup-screen t) +(setq initial-scratch-message nil) + +;;; Besseres Schreib-Layout +(defun my/text-indentation-setup () + "Angenehme Einrückung und Umbrüche für Text." + (setq-local left-margin-width 2) + (setq-local right-margin-width 0) + (visual-line-mode 1) + (setq-local word-wrap t) + (set-window-buffer nil (current-buffer))) + +(add-hook 'text-mode-hook #'my/text-indentation-setup) +(add-hook 'org-mode-hook #'my/text-indentation-setup) + +;;; Org: echte Einrückung unter Überschriften +(setq org-adapt-indentation t) + +(setq org-startup-indented t) +(add-hook 'org-mode-hook #'org-indent-mode) +(add-hook 'markdown-mode-hook #'outline-minor-mode) +(setq markdown-fontify-code-blocks-natively t) +(setq markdown-enable-math t) +(setq markdown-hide-markup t) + + +;;; Markdown-Einstellungen +(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. + '(package-selected-packages '(doom-themes markdown-mode nord-theme olivetti))) +(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. + ) + + +(setq select-enable-clipboard t) + +;; Wayland Clipboard Support via wl-copy / wl-paste +(setq interprogram-cut-function + (lambda (text &optional push) + (let ((process-connection-type nil)) + (let ((proc (start-process "wl-copy" nil "wl-copy"))) + (process-send-string proc text) + (process-send-eof proc))))) + +(setq interprogram-paste-function + (lambda () + (shell-command-to-string "wl-paste -n"))) diff --git a/lisp/init-markdown.el b/lisp/init-markdown.el new file mode 100644 index 0000000..6dc39b4 --- /dev/null +++ b/lisp/init-markdown.el @@ -0,0 +1,78 @@ +(require 'markdown-mode) + +(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode)) + +(defun my/markdown-setup () + "Ruhigere Darstellung für Markdown." + (visual-line-mode 1) + (outline-minor-mode 1) + (setq-local left-margin-width 2) + (setq-local right-margin-width 0) + (setq-local word-wrap t) + (setq-local markdown-hide-markup t) + (set-window-buffer nil (current-buffer))) + +(add-hook 'markdown-mode-hook #'my/markdown-setup) +(add-hook 'gfm-mode-hook #'my/markdown-setup) + +(setq markdown-fontify-code-blocks-natively t) +(setq markdown-enable-math t) +(setq markdown-hide-markup nil) +(setq markdown-list-indent-width 2) + +(with-eval-after-load 'markdown-mode + ;; Delimiter (#) nicht grell rot + (set-face-attribute 'markdown-header-delimiter-face nil + :foreground "#51afef" :weight 'normal) + + ;; Gesamtstil für Überschriften + (set-face-attribute 'markdown-header-face nil + :foreground "#51afef" :weight 'bold) + + ;; Level 1-6, ruhiger und org-artiger + (set-face-attribute 'markdown-header-face-1 nil + :foreground "#51afef" :weight 'bold :height 1.35) + (set-face-attribute 'markdown-header-face-2 nil + :foreground "#51afef" :weight 'bold :height 1.25) + (set-face-attribute 'markdown-header-face-3 nil + :foreground "#51afef" :weight 'bold :height 1.18) + (set-face-attribute 'markdown-header-face-4 nil + :foreground "#51afef" :weight 'semi-bold :height 1.12) + (set-face-attribute 'markdown-header-face-5 nil + :foreground "#51afef" :weight 'semi-bold :height 1.08) + (set-face-attribute 'markdown-header-face-6 nil + :foreground "#51afef" :weight 'normal :height 1.05) + ;; Marker ruhiger + (set-face-attribute 'markdown-header-delimiter-face nil + :foreground "#5B6268" :weight 'normal) + (set-face-attribute 'markdown-list-face nil + :foreground "#5B6268" :weight 'normal)) + +(provide 'init-markdown) + + +;; (add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode)) + +;; (add-hook 'markdown-mode-hook #'my/text-indentation-setup) +;; (add-hook 'markdown-mode-hook #'outline-minor-mode) + +;; (with-eval-after-load 'markdown-mode +;; (setq markdown-fontify-code-blocks-natively t) +;; (setq markdown-enable-math t) +;; (setq markdown-hide-markup t) + +;; ;; Ruhige, org-artige Überschriften für doom-badger +;; (set-face-attribute 'markdown-header-face-1 nil +;; :foreground "#e5e9f0" :weight 'bold :height 1.35) +;; (set-face-attribute 'markdown-header-face-2 nil +;; :foreground "#d8dee9" :weight 'bold :height 1.25) +;; (set-face-attribute 'markdown-header-face-3 nil +;; :foreground "#d8dee9" :weight 'bold :height 1.18) +;; (set-face-attribute 'markdown-header-face-4 nil +;; :foreground "#c0c5ce" :weight 'semi-bold :height 1.12) +;; (set-face-attribute 'markdown-header-face-5 nil +;; :foreground "#c0c5ce" :weight 'semi-bold :height 1.08) +;; (set-face-attribute 'markdown-header-face-6 nil +;; :foreground "#b0b6bf" :weight 'normal :height 1.05)) + +;; (provide 'init-markdown) diff --git a/lisp/init-markdown.el~ b/lisp/init-markdown.el~ new file mode 100644 index 0000000..fefe152 --- /dev/null +++ b/lisp/init-markdown.el~ @@ -0,0 +1,73 @@ +(require 'markdown-mode) + +(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode)) + +(defun my/markdown-setup () + "Ruhigere Darstellung für Markdown." + (visual-line-mode 1) + (outline-minor-mode 1) + (setq-local left-margin-width 2) + (setq-local right-margin-width 0) + (setq-local word-wrap t) + (setq-local markdown-hide-markup t) + (set-window-buffer nil (current-buffer))) + +(add-hook 'markdown-mode-hook #'my/markdown-setup) +(add-hook 'gfm-mode-hook #'my/markdown-setup) + +(setq markdown-fontify-code-blocks-natively t) +(setq markdown-enable-math t) +(setq markdown-hide-markup nil) +(setq markdown-list-indent-width 2) + +(with-eval-after-load 'markdown-mode + ;; Delimiter (#) nicht grell rot + (set-face-attribute 'markdown-header-delimiter-face nil + :foreground "#51afef" :weight 'normal) + + ;; Gesamtstil für Überschriften + (set-face-attribute 'markdown-header-face nil + :foreground "#51afef" :weight 'bold) + + ;; Level 1-6, ruhiger und org-artiger + (set-face-attribute 'markdown-header-face-1 nil + :foreground "#51afef" :weight 'bold :height 1.35) + (set-face-attribute 'markdown-header-face-2 nil + :foreground "#51afef" :weight 'bold :height 1.25) + (set-face-attribute 'markdown-header-face-3 nil + :foreground "#51afef" :weight 'bold :height 1.18) + (set-face-attribute 'markdown-header-face-4 nil + :foreground "#51afef" :weight 'semi-bold :height 1.12) + (set-face-attribute 'markdown-header-face-5 nil + :foreground "#51afef" :weight 'semi-bold :height 1.08) + (set-face-attribute 'markdown-header-face-6 nil + :foreground "#51afef" :weight 'normal :height 1.05)) + +(provide 'init-markdown) + + +;; (add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode)) + +;; (add-hook 'markdown-mode-hook #'my/text-indentation-setup) +;; (add-hook 'markdown-mode-hook #'outline-minor-mode) + +;; (with-eval-after-load 'markdown-mode +;; (setq markdown-fontify-code-blocks-natively t) +;; (setq markdown-enable-math t) +;; (setq markdown-hide-markup t) + +;; ;; Ruhige, org-artige Überschriften für doom-badger +;; (set-face-attribute 'markdown-header-face-1 nil +;; :foreground "#e5e9f0" :weight 'bold :height 1.35) +;; (set-face-attribute 'markdown-header-face-2 nil +;; :foreground "#d8dee9" :weight 'bold :height 1.25) +;; (set-face-attribute 'markdown-header-face-3 nil +;; :foreground "#d8dee9" :weight 'bold :height 1.18) +;; (set-face-attribute 'markdown-header-face-4 nil +;; :foreground "#c0c5ce" :weight 'semi-bold :height 1.12) +;; (set-face-attribute 'markdown-header-face-5 nil +;; :foreground "#c0c5ce" :weight 'semi-bold :height 1.08) +;; (set-face-attribute 'markdown-header-face-6 nil +;; :foreground "#b0b6bf" :weight 'normal :height 1.05)) + +;; (provide 'init-markdown) diff --git a/lisp/init-org.el b/lisp/init-org.el new file mode 100644 index 0000000..5b06901 --- /dev/null +++ b/lisp/init-org.el @@ -0,0 +1,7 @@ +(setq org-adapt-indentation t) +(setq org-startup-indented t) + +(add-hook 'org-mode-hook #'my/text-indentation-setup) +(add-hook 'org-mode-hook #'org-indent-mode) + +(provide 'init-org) diff --git a/lisp/init-org.el~ b/lisp/init-org.el~ new file mode 100644 index 0000000..e69de29 diff --git a/lisp/init-packages.el b/lisp/init-packages.el new file mode 100644 index 0000000..987156f --- /dev/null +++ b/lisp/init-packages.el @@ -0,0 +1,17 @@ +(require 'package) + +(setq package-archives + '(("gnu" . "https://elpa.gnu.org/packages/") + ("nongnu" . "https://elpa.nongnu.org/nongnu/") + ("melpa" . "https://melpa.org/packages/"))) + +(package-initialize) + +(unless package-archive-contents + (package-refresh-contents)) + +(dolist (pkg '(doom-themes markdown-mode)) + (unless (package-installed-p pkg) + (package-install pkg))) + +(provide 'init-packages) diff --git a/lisp/init-packages.el~ b/lisp/init-packages.el~ new file mode 100644 index 0000000..f66cf43 --- /dev/null +++ b/lisp/init-packages.el~ @@ -0,0 +1,10 @@ +(require 'package) + +(setq package-archives + '(("gnu" . "https://elpa.gnu.org/packages/") + ("nongnu" . "https://elpa.nongnu.org/nongnu/") + ("melpa" . "https://melpa.org/packages/"))) + +(package-initialize) + +(provide 'init-packages) diff --git a/lisp/init-ui.el b/lisp/init-ui.el new file mode 100644 index 0000000..bf0c807 --- /dev/null +++ b/lisp/init-ui.el @@ -0,0 +1,66 @@ +(require 'subr-x) +(require 'doom-themes) + +(load-theme 'doom-badger t) + +(setq inhibit-startup-screen t) +(setq initial-scratch-message nil) + +(menu-bar-mode -1) +(tool-bar-mode -1) +(scroll-bar-mode -1) + +(electric-pair-mode 1) + +;; Backups in Backup-Ordner +(setq backup-directory-alist + '(("." . "~/.emacs.d/backups"))) + +(setq make-backup-files t) ;; Backups aktiv +(setq backup-by-copying t) ;; sicherer (keine Symlink-Probleme) +(setq version-control t) ;; mehrere Versionen behalten +(setq delete-old-versions t) ;; alte automatisch löschen +(setq kept-new-versions 6) ;; wie viele neue behalten +(setq kept-old-versions 2) ;; wie viele alte behalten + + + +;; Maus im Terminal +(unless (display-graphic-p) + (xterm-mouse-mode 1)) + +;; Clipboard +(setq select-enable-clipboard t) +(setq select-enable-primary t) + +;; Wayland-Terminal Clipboard via wl-copy / wl-paste +(unless (display-graphic-p) + (setq interprogram-cut-function + (lambda (text &optional _push) + (let ((process-connection-type nil)) + (let ((proc (start-process "wl-copy" nil "wl-copy"))) + (process-send-string proc text) + (process-send-eof proc))))) + + (setq interprogram-paste-function + (lambda () + (string-trim-right + (shell-command-to-string "wl-paste -n 2>/dev/null"))))) + +;; Hintergrund etwas neutraler +(set-face-background 'default "#1e1e1e") +(set-face-background 'fringe "#1e1e1e") +(set-face-background 'region "#3a3a3a") + +;; Schreiblayout für Textmodi +(defun my/text-indentation-setup () + "Angenehme Einrückung und Umbrüche für Text." + (setq-local left-margin-width 2) + (setq-local right-margin-width 0) + (visual-line-mode 1) + (setq-local word-wrap t) + (set-window-buffer nil (current-buffer))) + +(add-hook 'text-mode-hook #'my/text-indentation-setup) + +(provide 'init-ui) diff --git a/lisp/init-ui.el~ b/lisp/init-ui.el~ new file mode 100644 index 0000000..bb69e95 --- /dev/null +++ b/lisp/init-ui.el~ @@ -0,0 +1,53 @@ +(require 'subr-x) +(require 'doom-themes) + +(load-theme 'doom-badger t) + +(setq inhibit-startup-screen t) +(setq initial-scratch-message nil) + +(menu-bar-mode -1) +(tool-bar-mode -1) +(scroll-bar-mode -1) + +(electric-pair-mode 1) + +;; Maus im Terminal +(unless (display-graphic-p) + (xterm-mouse-mode 1)) + +;; Clipboard +(setq select-enable-clipboard t) +(setq select-enable-primary t) + +;; Wayland-Terminal Clipboard via wl-copy / wl-paste +(unless (display-graphic-p) + (setq interprogram-cut-function + (lambda (text &optional _push) + (let ((process-connection-type nil)) + (let ((proc (start-process "wl-copy" nil "wl-copy"))) + (process-send-string proc text) + (process-send-eof proc))))) + + (setq interprogram-paste-function + (lambda () + (string-trim-right + (shell-command-to-string "wl-paste -n 2>/dev/null"))))) + +;; Hintergrund etwas neutraler +(set-face-background 'default "#1e1e1e") +(set-face-background 'fringe "#1e1e1e") +(set-face-background 'region "#3a3a3a") + +;; Schreiblayout für Textmodi +(defun my/text-indentation-setup () + "Angenehme Einrückung und Umbrüche für Text." + (setq-local left-margin-width 2) + (setq-local right-margin-width 0) + (visual-line-mode 1) + (setq-local word-wrap t) + (set-window-buffer nil (current-buffer))) + +(add-hook 'text-mode-hook #'my/text-indentation-setup) + +(provide 'init-ui)