diff options
| author | TCCQ <thomasmulmer02@gmail.com> | 2025-02-14 15:40:29 -0800 |
|---|---|---|
| committer | TCCQ <thomasmulmer02@gmail.com> | 2025-02-14 15:40:29 -0800 |
| commit | 2576f016153baa11c6e62deeb329dd72f0aa89c8 (patch) | |
| tree | afd9e5c4cd42a67a4cacd82fc4f63622c1a26990 /emacs/personal-lisp | |
| parent | 5b23587f638dde8faf821edd50d72cb988af5387 (diff) | |
emacs full rework from laptop
Diffstat (limited to 'emacs/personal-lisp')
| -rw-r--r-- | emacs/personal-lisp/chinese.el | 18 | ||||
| -rwxr-xr-x | emacs/personal-lisp/coding-config.el | 165 | ||||
| -rw-r--r-- | emacs/personal-lisp/custom-binds.el | 20 | ||||
| -rw-r--r-- | emacs/personal-lisp/custom-funcs.el | 127 | ||||
| -rw-r--r-- | emacs/personal-lisp/evil-conf.el | 69 | ||||
| -rw-r--r-- | emacs/personal-lisp/general-text.el | 23 | ||||
| -rwxr-xr-x | emacs/personal-lisp/single-header.el | 131 | ||||
| -rw-r--r-- | emacs/personal-lisp/tex-conf.el | 47 | ||||
| -rwxr-xr-x | emacs/personal-lisp/tmu-custom-theme.el | 64 |
9 files changed, 0 insertions, 664 deletions
diff --git a/emacs/personal-lisp/chinese.el b/emacs/personal-lisp/chinese.el deleted file mode 100644 index 4b01594..0000000 --- a/emacs/personal-lisp/chinese.el +++ /dev/null @@ -1,18 +0,0 @@ -;; chinese input stuff -;; (require 'unicode-fonts) -;; (unicode-fonts-setup) -(require 'pyim) -(require 'pyim-basedict) -(pyim-basedict-enable) -;; (require 'pyim-wbdict) -(setq default-input-method "pyim") -(setq pyim-default-scheme 'quanpin) -;; (pyim-wbdict-v98-morphe-enable) -;; (dolist (charset '(kana han symbol cjk-misc bopomofo)) -;; (set-fontset-font (frame-parameter nil 'font) -;; charset -;; (font-spec :family "FangSong" :size 15))) -;; (setq rime-translate-keybindings -;; '("C-f" "C-b" "C-n" "C-p" "C-g" "<left>" "<right>" "<up>" "<down>" "<prior>" "<next>" "<delete>")) -;; (setq rime-share-data-dir "~/.local/share/fcitx5/rime") -;; (setq rime-show-candidate 'popup) diff --git a/emacs/personal-lisp/coding-config.el b/emacs/personal-lisp/coding-config.el deleted file mode 100755 index 2ddfbd6..0000000 --- a/emacs/personal-lisp/coding-config.el +++ /dev/null @@ -1,165 +0,0 @@ -;; Various config specifically for programming - -(add-hook 'xref-backend-functions 'gxref-xref-backend) - -;; better commenting binds -(global-set-key (kbd "C-x C-;") 'comment-or-uncomment-region) -(global-set-key (kbd "C-x ;") 'comment-line) -(global-set-key (kbd "C-x :") 'comment-set-column) ;never gonna use but whatever - -(setq asm-comment-char ?#) ; prefer # over ; for asm comments - -;; generate tags for label names in asm files, based on asm files in the current directory -(add-hook 'asm-mode-hook - (lambda () - (add-hook 'after-save-hook - (lambda () - (shell-command - "find . -iregex '.*\\.[sS]' -exec etags -l none -r '/\\([a-zA-Z0-9\\-_]+\\):/\1/' {} +")) - 0 t))) - -;; nice eglot binds -(global-set-key (kbd "C-c f") 'eglot-code-action-quickfix) -(global-set-key (kbd "C-c C-f") 'eglot-code-actions) - -;; Find defs in various ways -(global-set-key (kbd "M-i") 'imenu) -(global-set-key (kbd "M-I") 'xref-find-definitions) - - -;; make ibuffer play with projectile -(require 'ibuffer) -(add-hook 'ibuffer-hook - (lambda () - (ibuffer-projectile-set-filter-groups) - (unless (eq ibuffer-sorting-mode 'alphabetic) - (ibuffer-do-sort-by-alphabetic)))) - -;; make shells and whatnot slightly better -(require 'comint) -(setq comint-scroll-to-bottom-on-input t) -(setq comint-scroll-to-bottom-on-output t) - -;; various folding types and binds -(autoload 'hide-lines "hide-lines" "Hide lines based on a regexp" t) -(global-set-key (kbd "C-c /") 'hide-lines) -(autoload 'fold-this "fold-this" "arbitrary folding" t) -(autoload 'fold-this-unfold-at-point "fold-this" "arbitrary folding" t) -(define-prefix-command 'fold-map) -(global-set-key (kbd "M-F") 'fold-map) -(define-keymap :full nil - :parent nil - :suppress nil - :keymap nil - :name "fold-map" - :prefix 'fold-map - (kbd "c") 'fold-this - (kbd "e") 'fold-this-unfold-at-point - (kbd "t") 'hs-toggle-hiding - (kbd "f") 'fold-this-fold-forward - (kbd "b") 'fold-this-fold-backward - (kbd "l") 'hs-hide-level) - -;; global prog stuff that differs from global/text -(add-hook 'prog-mode-hook (lambda () - (hs-minor-mode 1) - ;; (flymake-mode 1) - (spell-fu-mode 0) - (superword-mode 1) - (whitespace-mode 1) - (modify-syntax-entry ?_ "w") ) - (display-fill-column-indicator-mode 1) - (add-hook 'before-save-hook - (lambda () - (if (not (eq major-mode 'makefile-gmake-mode)) - (clean-prog-file (current-buffer)))))) - -;; haskell flavor and tags -(setq haskell-tags-on-save t) -(add-hook 'haskell-mode-hook (lambda () - (hindent 1) - (interactive-haskell-mode 1) - (eldoc-mode 1))) -(setq haskell-process-type 'cabal-repl) - -;; eshell stuff -(require 'eshell) -(require 'esh-help) -(setup-esh-help-eldoc) -(add-hook 'eshell-mode-hook (lambda () (eldoc-mode 1))) -(add-hook 'eshell-mode-hook 'eshell-fringe-status-mode) -(require 'em-smart) -(setq eshell-where-to-jump 'begin) -(setq eshell-review-quick-commands 'not-even-short-output) -(setq eshell-smart-space-goes-to-end t) -(add-to-list 'eshell-modules-list 'eshell-smart) -(eshell-vterm-mode 1) -(setq eshell-visual-commands - (append eshell-visual-commands - '("ytfzf" "nmtui" "w3m"))) - -(add-hook 'vterm-mode-hook (lambda () (hl-line-mode 0))) -(add-hook 'eshell-mode-hook (lambda () (hl-line-mode 0))) - -(define-key vterm-mode-map (kbd "M-W") 'persp-switch-to-buffer) -(define-key vterm-mode-map (kbd "M-k") 'persp-kill-buffer) -(define-key vterm-mode-map (kbd "M-p") 'persp-key-map) - -(define-key eshell-mode-map (kbd "M-o") 'other-window) -(define-key eshell-mode-map (kbd "M-W") 'switch-buffer) -(define-key eshell-mode-map (kbd "C-l") (lambda () (interactive) (recenter-top-bottom 0))) - -;; scuffed compilation binds and prefs -(global-set-key (kbd "M-m") (lambda () - (interactive) - (if flymake-mode - (flymake-goto-next-error) - (next-error)))) -(global-set-key (kbd "M-M") 'recompile) -(setq compilation-always-kill t - compilation-scroll-output t) -;; Allow compilation buffer to be dedicated across frames -(push '("\\*compilation\\*" . (nil (reusable-frames . t))) display-buffer-alist) - - -;; better searching -(setq counsel-grep-base-command - "rg -i -M 120 --no-heading --line-number --color never '%s' %s") -(global-set-key (kbd "C-s") 'counsel-grep-or-swiper) -(global-set-key (kbd "C-S-s") 'isearch-forward) -(define-key evil-normal-state-map (kbd "C-r") 'counsel-rg) - -(require 'persp-mode) -(persp-mode 1) - -(with-eval-after-load "persp-mode" - (defvar after-switch-to-buffer-functions nil) - (defvar after-display-buffer-functions nil) - - (if (fboundp 'advice-add) - ;;Modern way - (progn - (defun after-switch-to-buffer-adv (&rest r) - (apply #'run-hook-with-args 'after-switch-to-buffer-functions r)) - (defun after-display-buffer-adv (&rest r) - (apply #'run-hook-with-args 'after-display-buffer-functions r)) - (advice-add #'switch-to-buffer :after #'after-switch-to-buffer-adv) - (advice-add #'display-buffer :after #'after-display-buffer-adv)) - - (add-hook 'after-switch-to-buffer-functions - #'(lambda (bn) (when (and persp-mode - (not persp-temporarily-display-buffer)) - (persp-add-buffer bn))))) - - (setq persp-add-buffer-on-after-change-major-mode 'free - persp-autokill-buffer-on-remove t - persp-kill-foreign-buffer-behaviour 'dont-ask) - (global-set-key (kbd "M-p") 'persp-key-map) - (global-set-key (kbd "C-x b") #'persp-switch-to-buffer) - (global-set-key (kbd "C-x B") #'switch-to-buffer) - (global-set-key (kbd "C-x C-b") (lambda () - (interactive) - (with-persp-buffer-list () (ibuffer)))) - (global-set-key (kbd "M-W") #'persp-switch-to-buffer) - (global-set-key (kbd "C-x k") #'persp-kill-buffer)) - diff --git a/emacs/personal-lisp/custom-binds.el b/emacs/personal-lisp/custom-binds.el deleted file mode 100644 index 92dcc69..0000000 --- a/emacs/personal-lisp/custom-binds.el +++ /dev/null @@ -1,20 +0,0 @@ -;; keyboard binds (mostly global) -(global-set-key (kbd "C-x C-C") 'save-buffers-kill-terminal) -(global-set-key (kbd "C-x C-c") 'close-or-kill) -(global-set-key (kbd "M-w") 'copy-region-as-kill) ;;make copying not flash cursor -(global-set-key (kbd "M-(") 'wrap-region-paren) -(global-set-key (kbd "M-z") 'zap-whitespace) -(global-set-key (kbd "C-M-z") 'wrap-sexp) -(require 'buffer-move) -(global-set-key (kbd "C-x -") 'buf-move-right) -(global-set-key (kbd "M-o") 'other-window) -(global-set-key (kbd "M-c") 'calc) -(global-set-key (kbd "M-k") 'kill-current-buffer) -(global-set-key (kbd "M-K") 'kill-buffer-and-window) -(global-set-key (kbd "M-U") 'scroll-lock-mode) -(global-set-key (kbd "M-Q") 'auto-fill-mode) -(require 'dired) -(define-key dired-mode-map (kbd "C-o") 'dired-display-file) -;; (add-hook 'dired-mode-hook (lambda () -;; (define-key evil-normal-state-local-map (kbd "C-o") -;; 'dired-display-file))) diff --git a/emacs/personal-lisp/custom-funcs.el b/emacs/personal-lisp/custom-funcs.el deleted file mode 100644 index 79946ff..0000000 --- a/emacs/personal-lisp/custom-funcs.el +++ /dev/null @@ -1,127 +0,0 @@ - -;; see transparancy in init.el -(defun toggle-frame-transparency () - "Toggle transparency." - (interactive) - (let ((alpha-transparency 90)) - (if (eq alpha-transparency (frame-parameter nil 'alpha-background)) - (set-frame-parameter nil 'alpha-background 100) - (set-frame-parameter nil 'alpha-background alpha-transparency)))) - -(defun wrap-region-paren () - "Wraps the region in parens. -Similar to pressing ( with the region active." - (interactive) - (let ((beg (region-beginning)) - (end (region-end))) - (save-excursion - (goto-char beg) - (insert "(") - (goto-char (+ end 1)) - (insert ")") - ))) - -(defun zap-whitespace () - "zaps the whitespace around the point in both directions" - (interactive) - (push-mark) - (skip-chars-backward " \t\n") - (push-mark) - (skip-chars-forward " \t\n") - (delete-region (mark) (point)) - (pop-mark) - (goto-char (mark)) - (pop-mark)) - -(defun wrap-sexp (&optional arg) - "Wraps the following sexp in a pair of parens. -Places inside the new pair, with prefix arg do the same backwards, pushing the -mark. Does the same of ARG number sexps if given" - (interactive "P") - (message "%s" arg) - (if arg - (progn - (push-mark) - (insert-pair -1 ?\( ?\))) - (insert-pair 1 ?\( ?\)))) - -(defun close-or-kill () - "If this is the sole frame, kill emacs. Otherwise close the frame." - (interactive) - (if (eq 1 (length (frame-list))) - ;; sole frame, exit - (save-buffers-kill-terminal) - (delete-frame))) - -;; indent code when pasting, from -;; https://trey-jackson.blogspot.com/2008/03/emacs-tip-15-indent-yanked-code.html - -;; automatically indenting yanked text if in programming-modes -(defvar yank-indent-modes '(emacs-lisp-mode - c-mode c++-mode - tcl-mode sql-mode - perl-mode cperl-mode - java-mode jde-mode - lisp-interaction-mode - LaTeX-mode TeX-mode - rust-mode - rustic-mode) - "Modes in which to indent regions that are yanked (or yank-popped).") - -(defun yank-advised-indent-function (beg end) - "Do indentation, as long as the region isn't too large. -BEG and END define the region." - (indent-region beg end nil)) - -(defadvice yank (after yank-indent activate) - "If current mode is one of 'yank-indent-modes, indent yanked text (with prefix arg don't indent)." - (if (and (not (ad-get-arg 0)) - (member major-mode yank-indent-modes)) - (let ((transient-mark-mode nil)) - (yank-advised-indent-function (region-beginning) (region-end))))) - -(defadvice yank-pop (after yank-pop-indent activate) - "If current mode is one of 'yank-indent-modes, indent yanked text (with prefix arg don't indent)." - (if (and (not (ad-get-arg 0)) - (member major-mode yank-indent-modes)) - (let ((transient-mark-mode nil)) - (yank-advised-indent-function (region-beginning) (region-end))))) - -(defadvice evil-paste-before (after yank-indent activate) - "If current mode is one of 'yank-indent-modes, indent yanked text (with prefix arg don't indent)." - (if (and (not (ad-get-arg 0)) - (member major-mode yank-indent-modes)) - (let ((transient-mark-mode nil)) - (yank-advised-indent-function (region-beginning) (region-end))))) - -(defadvice evil-paste-after (after yank-indent activate) - "If current mode is one of 'yank-indent-modes, indent yanked text (with prefix arg don't indent)." - (if (and (not (ad-get-arg 0)) - (member major-mode yank-indent-modes)) - (let ((transient-mark-mode nil)) - (yank-advised-indent-function (region-beginning) (region-end))))) - -(defun fold-this-fold-forward (&optional arg) - "Fold forward ARG number of sexps, defaulting to one." - (interactive "p") - (push-mark) - (forward-sexp arg) - (fold-this (mark) (point)) - (pop-mark)) - -(defun fold-this-fold-backward (&optional arg) - "Fold backward ARG number of sexps, defaulting to one." - (interactive "p") - (push-mark) - (backward-sexp arg) - (fold-this (point) (mark)) - (pop-mark)) - -(defun clean-prog-file (buffer) - "Fixes whitespace in buffer" - (save-excursion - (with-current-buffer buffer - (untabify (point-min) (point-max)) - (goto-char (point-min)) - (while (re-search-forward " +$" nil t) - (replace-match "" nil nil))))) diff --git a/emacs/personal-lisp/evil-conf.el b/emacs/personal-lisp/evil-conf.el deleted file mode 100644 index 7c389fe..0000000 --- a/emacs/personal-lisp/evil-conf.el +++ /dev/null @@ -1,69 +0,0 @@ - -;; evil mode stuff -(setq - evil-want-keybinding nil - evil-want-integration t) -;; evil-want-C-d-scroll nil -;; evil-want-C-w-delete nil -;; evil-disable-insert-state-bindings t -;; evil-respect-visual-line-mode t -(require 'evil) -(when (require 'evil-collection nil t) - (evil-collection-init)) -(evil-mode 1) -(evilem-default-keybindings "SPC") -(define-key evil-motion-state-map (kbd "TAB") 'indent-for-tab-command) -(evil-set-initial-state 'vterm-mode 'emacs) -(use-package evil-surround - :ensure t - :config - (global-evil-surround-mode 1)) -(use-package evil-snipe - :ensure t - :config - (evil-snipe-mode +1) - (evil-snipe-override-mode +1) - (setq evil-snipe-scope 'buffer) - (evil-define-key 'visual evil-snipe-local-mode-map "z" 'evil-snipe-s) - (evil-define-key 'visual evil-snipe-local-mode-map "Z" 'evil-snipe-S)) -(define-key evil-insert-state-map (kbd "C-d") 'delete-char) -(define-key evil-insert-state-map (kbd "C-e") 'move-end-of-line) -(define-key evil-insert-state-map (kbd "C-a") 'move-beginning-of-line) -(define-key evil-normal-state-map (kbd "M-.") 'xref-find-definitions) -(define-key evil-normal-state-map (kbd "C-t") 'transpose-chars) -(define-key evil-normal-state-map (kbd "M-Z") 'suspend-frame) - -;;; sasha bindings -(defun evil-window-split-and-switch () - "Split the window vertically and switch to the new buffer." - (interactive) - (evil-window-split) - (other-window 1)) - -(defun evil-window-vsplit-and-switch () - "Split the window horizontally and switch to the new buffer." - (interactive) - (evil-window-vsplit) - (other-window 1)) - -(evil-define-key 'normal global-map (kbd "SPC i") 'imenu) -(evil-define-key 'normal global-map (kbd "SPC RET") 'vterm) -(evil-define-key 'normal global-map (kbd "SPC v") 'vterm) -(evil-define-key 'normal global-map (kbd "SPC !") 'abort-recursive-edit) -(evil-define-key 'normal global-map (kbd "SPC f f") 'find-file) - -(evil-define-key 'normal global-map (kbd "SPC SPC SPC j") 'evil-window-split-and-switch) -(evil-define-key 'normal global-map (kbd "SPC SPC SPC k") 'evil-window-split-and-switch) -(evil-define-key 'normal global-map (kbd "SPC SPC SPC h") 'evil-window-vsplit-and-switch) -(evil-define-key 'normal global-map (kbd "SPC SPC SPC l") 'evil-window-vsplit-and-switch) -(evil-define-key 'normal global-map (kbd "SPC SPC h") 'evil-window-left) -(evil-define-key 'normal global-map (kbd "SPC SPC j") 'evil-window-down) -(evil-define-key 'normal global-map (kbd "SPC SPC k") 'evil-window-up) -(evil-define-key 'normal global-map (kbd "SPC SPC l") 'evil-window-right) -(evil-define-key 'normal global-map (kbd "SPC SPC w") 'delete-window) -(evil-define-key 'normal global-map (kbd "SPC SPC q") 'delete-window) -(evil-define-key 'normal global-map (kbd "SPC SPC b") 'balance-windows) -(evil-define-key 'normal global-map (kbd "SPC s s") 'save-buffer) -(evil-define-key 'normal global-map (kbd "SPC s f") 'counsel-find-file) -(evil-define-key 'normal global-map (kbd "SPC s r") 'counsel-rg) -(evil-define-key 'normal global-map (kbd "SPC ;") 'frog-jump-buffer) diff --git a/emacs/personal-lisp/general-text.el b/emacs/personal-lisp/general-text.el deleted file mode 100644 index bea3fc9..0000000 --- a/emacs/personal-lisp/general-text.el +++ /dev/null @@ -1,23 +0,0 @@ -;; General stuff for editing all text, but particularly prose - -;; spelling -(require 'spell-fu) -(setq ispell-personal-dictionary "/home/tmu/.aspell.en.pws") -(add-hook 'text-mode-hook (lambda () (spell-fu-mode 1))) - -;; dictionaries -(define-prefix-command 'dict-map) -(global-set-key (kbd "M-l") 'dict-map) -(define-keymap :full nil - :parent nil - :suppress nil - :keymap nil - :name "dict-map" - :prefix 'dict-map - (kbd "w") 'sdcv-search-input - (kbd "c") (lambda () (interactive) - (activate-input-method 'pyim) - (sdcv-search-input (read-from-minibuffer "Chinese Word: " - nil nil nil - nil nil t)) - (activate-input-method nil))) diff --git a/emacs/personal-lisp/single-header.el b/emacs/personal-lisp/single-header.el deleted file mode 100755 index 5ca4afc..0000000 --- a/emacs/personal-lisp/single-header.el +++ /dev/null @@ -1,131 +0,0 @@ -(defvar single-header--current-header-buffer nil "Read the name") - -(defvar single-header-format '(make-header-info-string) "evaluated to fill the header") - -(defface single-header '((default . (:background "#000000" :family "Source Code Pro"))) "Face for top line") - -(require 'battery) -(defun with-face (str &rest face-plist) - (add-face-text-property 0 (length str) face-plist t str) - str) - -;; disable normal emms-state and move it to the header -;; (require 'emms-state) -;; (setq single-header-emms-state-format-string -;; '(emms-state -;; (" " emms-state -;; (emms-state-current-playing-time -;; (" " -;; (:propertize emms-state-current-playing-time -;; face emms-state-current-playing-time))) -;; (emms-state-total-playing-time -;; ("(" -;; (:propertize emms-state-total-playing-time -;; face emms-state-total-playing-time) -;; ")")) -;; emms-mode-line-string))) -;; (setq emms-state-mode-line-string "") - -(defun make-header-info-string () - "generates the mode line string that contains all the info to the right" - (let ((win (when (buffer-live-p single-header--current-header-buffer) - (get-buffer-window single-header--current-header-buffer))) - (str (concat - (format-time-string "%a, %b %+4Y-%0m-%0d ") - (with-face (format-time-string "%R ") - :weight 'bold) - (with-face (format "<%03.2f> " (car (load-average 1))) - :foreground "#da70d6") - (with-face (let* ((mi (memory-info)) - (tm (float (car mi))) - (fm (float (car (cdr mi)))) - (ts (float (car (cdr (cdr mi))))) - (fs (float (car (cdr (cdr (cdr mi))))))) - (format "{%.2f %.2f} " (- 1 (/ fm tm)) (- 1 (/ fs ts)))) - :foreground "#00ced1") - (with-face (battery-format "[%b%p%%] " (and battery-status-function (funcall battery-status-function))) - :weight 'bold) - ;; (format-mode-line single-header-emms-state-format-string) - ))) - (setq str (concat str - (cond (win (make-string - (- (window-max-chars-per-line win 'single-header) (length str)) ? )) - (t "")) - )) - (with-face str 'single-header))) - - -(setq global-mode-string '("" (:eval (concat (with-face (format " [%s] " default-directory) - :weight 'bold - :foreground "green2"))))) - -(defun single-header-init-buffer (buf) - (with-current-buffer buf - (insert "header test") - (jit-lock-mode nil) - (font-lock-mode -1) - (buffer-disable-undo) - (setq-local mode-line-format nil) - (setq-local header-line-format nil) - (setq-local cursor-type nil) - (setq-local cursor-in-non-selected-windows nil) - (setq-local overflow-newline-into-fringe nil) - (setq-local word-wrap nil) - (setq-local show-trailing-whitespace nil))) - -(defun single-header-init-window (win) - (with-selected-window win - (set-window-dedicated-p win t) - (set-window-parameter win 'no-other-window t) - (set-window-parameter win 'no-delete-other-windows t) - (set-window-margins win 0 0) - (set-window-fringes win 0 0) - (set-window-scroll-bars win 0 nil 0 nil) - (setq-local window-min-height 1) - (setq-local window-safe-min-height 1) - (let - (window-size-fixed) - (fit-window-to-buffer win 1)) - (setq-local window-size-fixed t) - (when - (fboundp 'window-preserve-size) - (window-preserve-size win nil t)))) - -(defun single-header-show (buf) - "show / make a header" - (if (buffer-live-p buf) - (let ((win (display-buffer-in-side-window buf '((side . top) - (slot . -100))))) - (single-header-init-window win)) - (single-header-make))) - -(defun single-header-make () - "create the fake header line" - (interactive) - (unless (buffer-live-p single-header--current-header-buffer) - (let ((buf (generate-new-buffer "*header*"))) - (single-header-init-buffer buf) - (setq single-header--current-header-buffer buf) - (single-header-show buf)))) - -(defun single-header-delete () - "remove an existing header buffer" - (interactive) - (when (buffer-live-p single-header--current-header-buffer) - (kill-buffer single-header--current-header-buffer))) - -(defun single-header-update () - "update the contents of the header line according to `single-header-format'" - (when (buffer-live-p single-header--current-header-buffer) - (with-current-buffer single-header--current-header-buffer - (erase-buffer) - (insert (eval single-header-format))))) - -(add-hook 'after-make-frame-functions (lambda (frame) - (with-selected-frame frame - (single-header-show single-header--current-header-buffer)))) - -;; do init frame seperately -(single-header-show single-header--current-header-buffer) -(run-with-timer 0 1 'single-header-update) - diff --git a/emacs/personal-lisp/tex-conf.el b/emacs/personal-lisp/tex-conf.el deleted file mode 100644 index 4592ce5..0000000 --- a/emacs/personal-lisp/tex-conf.el +++ /dev/null @@ -1,47 +0,0 @@ -;; latex stuff -(require 'tex-mode) -(define-key latex-mode-map (kbd "C-c m") (lambda () (interactive) - (push-mark) - (insert "\\[\n\n\\]") - (indent-region (mark) (point)) - (pop-mark) - (previous-line) - (indent-for-tab-command) - )) - -;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; ;;;;;;;;;;;;;;;; LaTeX ;;;;;;;;;;;;;;;;; -;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -;; ##### Don't forget to configure -;; ##### Okular to use emacs in -;; ##### "Configuration/Configure Okular/Editor" -;; ##### => Editor => Emacsclient. (you should see -;; ##### emacsclient -a emacs --no-wait +%l %f -;; ##### in the field "Command". - -(add-hook 'LaTeX-mode-hook 'turn-on-reftex) -(setq reftex-plug-into-AUCTeX t) - -;; ##### Always ask for the master file -;; ##### when creating a new TeX file. -(setq-default TeX-master nil) - -;; ##### Enable synctex correlation. From Okular just press -;; ##### Shift + Left click to go to the good line. -(setq TeX-source-correlate-mode t - TeX-source-correlate-start-server t) - -;; ### Set Okular as the default PDF viewer. -(eval-after-load "tex" - '(setcar (cdr (assoc 'output-pdf TeX-view-program-selection)) "Okular")) - -(add-hook 'tex-mode-hook (lambda () - (setq spell-fu-faces-exclude - '(tex-math - font-lock-builtin-face - font-lock-keyword-face - font-lock-function-name-face - font-lock-variable-name-face - font-latex-sedate-face)) - (outline-minor-mode 1))) diff --git a/emacs/personal-lisp/tmu-custom-theme.el b/emacs/personal-lisp/tmu-custom-theme.el deleted file mode 100755 index 37032e6..0000000 --- a/emacs/personal-lisp/tmu-custom-theme.el +++ /dev/null @@ -1,64 +0,0 @@ -(deftheme tmu-custom - "Created 2023-01-06.") - -(custom-theme-set-faces - 'tmu-custom - '(cursor ((((background light)) (:background "black")) (((background dark)) (:background "white")))) - '(fixed-pitch ((t (:family "Monospace")))) - '(variable-pitch ((((type w32)) (:foundry "outline" :family "Arial")) (t (:family "Sans Serif")))) - '(escape-glyph ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "brown")))) - '(homoglyph ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "brown")))) - '(minibuffer-prompt ((t (:weight bold :box (:line-width (1 . -1) :color "red" :style released-button) :foreground "white smoke" :background "royal blue")))) - '(highlight ((t (:background "gray30")))) - '(region ((t (:extend t :background "SeaGreen4")))) - '(shadow ((((class color grayscale) (min-colors 88) (background light)) (:foreground "grey50")) (((class color grayscale) (min-colors 88) (background dark)) (:foreground "grey70")) (((class color) (min-colors 8) (background light)) (:foreground "green")) (((class color) (min-colors 8) (background dark)) (:foreground "yellow")))) - '(secondary-selection ((t (:extend t :foreground "#f6f3e8" :background "#333366")))) - '(trailing-whitespace ((((class color) (background light)) (:background "red1")) (((class color) (background dark)) (:background "red1")) (t (:inverse-video t)))) - '(font-lock-bracket-face ((t (:inherit (font-lock-punctuation-face))))) - '(font-lock-builtin-face ((t (:foreground "chartreuse2")))) - '(font-lock-comment-delimiter-face ((default (:inherit (font-lock-comment-face))))) - '(font-lock-comment-face ((t (:foreground "orchid2")))) - '(font-lock-constant-face ((t (:foreground "maroon1")))) - '(font-lock-delimiter-face ((t (:inherit (font-lock-punctuation-face))))) - '(font-lock-doc-face ((t (:foreground "indian red")))) - '(font-lock-doc-markup-face ((t (:inherit (font-lock-constant-face))))) - '(font-lock-escape-face ((t (:inherit (font-lock-regexp-grouping-backslash))))) - '(font-lock-function-name-face ((t (:foreground "spring green")))) - '(font-lock-keyword-face ((t (:weight bold :foreground "light sea green")))) - '(font-lock-negation-char-face ((t nil))) - '(font-lock-number-face ((t nil))) - '(font-lock-misc-punctuation-face ((t (:inherit (font-lock-punctuation-face))))) - '(font-lock-operator-face ((t nil))) - '(font-lock-preprocessor-face ((t (:foreground "cornflower blue")))) - '(font-lock-property-face ((t (:inherit (font-lock-variable-name-face))))) - '(font-lock-punctuation-face ((t nil))) - '(font-lock-regexp-grouping-backslash ((t (:inherit (bold))))) - '(font-lock-regexp-grouping-construct ((t (:inherit (bold))))) - '(font-lock-string-face ((t (:foreground "Skyblue1")))) - '(font-lock-type-face ((t (:foreground "medium purple")))) - '(font-lock-variable-name-face ((t (:foreground "PaleGreen2")))) - '(font-lock-warning-face ((t (:weight bold :foreground "hot pink")))) - '(button ((t (:inherit (link))))) - '(link ((((class color) (min-colors 88) (background light)) (:underline (:color foreground-color :style line :position nil) :foreground "RoyalBlue3")) (((class color) (background light)) (:underline (:color foreground-color :style line :position nil) :foreground "blue")) (((class color) (min-colors 88) (background dark)) (:underline (:color foreground-color :style line :position nil) :foreground "cyan1")) (((class color) (background dark)) (:underline (:color foreground-color :style line :position nil) :foreground "cyan")) (t (:inherit (underline))))) - '(link-visited ((default (:inherit (link))) (((class color) (background light)) (:foreground "magenta4")) (((class color) (background dark)) (:foreground "violet")))) - '(fringe ((((class color) (background light)) (:background "grey95")) (((class color) (background dark)) (:background "grey10")) (t (:background "gray")))) - '(header-line ((t (:inherit mode-line)))) - '(tooltip ((((class color)) (:inherit (variable-pitch) :foreground "black" :background "lightyellow")) (t (:inherit (variable-pitch))))) - '(mode-line ((t (:background "black" :family "DejaVu Sans")))) - '(mode-line-buffer-id ((t (:weight bold)))) - '(mode-line-emphasis ((t (:weight bold)))) - '(mode-line-highlight ((((supports :box t) (class color) (min-colors 88)) (:box (:line-width (2 . 2) :color "grey40" :style released-button))) (t (:inherit (highlight))))) - '(mode-line-inactive ((t (:inherit mode-line :foreground "dark gray")))) - '(isearch ((((class color) (min-colors 88) (background light)) (:foreground "lightskyblue1" :background "magenta3")) (((class color) (min-colors 88) (background dark)) (:foreground "brown4" :background "palevioletred2")) (((class color) (min-colors 16)) (:foreground "cyan1" :background "magenta4")) (((class color) (min-colors 8)) (:foreground "cyan1" :background "magenta4")) (t (:inverse-video t)))) - '(isearch-fail ((((class color) (min-colors 88) (background light)) (:background "RosyBrown1")) (((class color) (min-colors 88) (background dark)) (:background "red4")) (((class color) (min-colors 16)) (:background "red")) (((class color) (min-colors 8)) (:background "red")) (((class color grayscale)) (:foreground "grey")) (t (:inverse-video t)))) - '(lazy-highlight ((((class color) (min-colors 88) (background light)) (:distant-foreground "black" :background "paleturquoise")) (((class color) (min-colors 88) (background dark)) (:distant-foreground "white" :background "paleturquoise4")) (((class color) (min-colors 16)) (:distant-foreground "white" :background "turquoise3")) (((class color) (min-colors 8)) (:distant-foreground "white" :background "turquoise3")) (t (:underline (:color foreground-color :style line :position nil))))) - '(match ((((class color) (min-colors 88) (background light)) (:background "khaki1")) (((class color) (min-colors 88) (background dark)) (:background "RoyalBlue3")) (((class color) (min-colors 8) (background light)) (:foreground "black" :background "yellow")) (((class color) (min-colors 8) (background dark)) (:foreground "white" :background "blue")) (((type tty) (class mono)) (:inverse-video t)) (t (:background "gray")))) - '(next-error ((t (:inherit (region))))) - '(query-replace ((t (:inherit (isearch))))) - '(default ((t (:family "Source Code Pro" :foundry "ADBO" :width normal :height 98 :weight regular :slant normal :underline nil :overline nil :extend nil :strike-through nil :box nil :inverse-video nil :foreground "white smoke" :background "gray10" :stipple nil :inherit nil)))) - '(frog-menu-posframe-background-face ((t (:background "RoyalBlue4")))) - '(minibuffer-prompt ((t (:background "gray10" :foreground "cyan" :box nil :weight bold)))) - '(pyim-page ((t (:inherit default :background "#333333" :foreground "#dcdccc")))) - '(vterm-color-blue ((t (:inherit ansi-color-bright-green))))) - -(provide-theme 'tmu-custom) |
