From c0a14febd5a17ac3e5d4279f928944c31db4b1ba Mon Sep 17 00:00:00 2001 From: opal Date: Sun, 26 Dec 2021 15:05:34 -0800 Subject: [PATCH] Refactored --- .config/emacs/init.el | 81 +++---------------------------------------- Emacs.org | 75 +++------------------------------------ 2 files changed, 10 insertions(+), 146 deletions(-) diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 3ba1f7f..a3bd03f 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -32,8 +32,11 @@ (set-default 'truncate-lines nil) ;; Wrap lines at end of screen (setq visible-bell t) ;; Visible flash to represent a bell (setq x-select-enable-clipboard t) ;; Enable clipboard -(global-tab-line-mode -1) -(setq inhibit-startup-message t) +(global-tab-line-mode -1) ;; Disable tab mode +(setq inhibit-startup-message t) ;; What it says +(setq global-auto-revert-non-file-buffers t) +(global-auto-revert-mode 1) ;; Revert all buffers on change +(setq custom-safe-themes t) ;; Treat themes as safe ;; Disable line mode for specific major/minor modes. (dolist (mode '(org-mode-hook)) @@ -678,77 +681,3 @@ ;; erc-interpret-mirc-color t ;; erc-rename-buffers t ;; erc-track-exclude-server-buffer t)) - -;; (defun efs/exwm-update-class () -;; (exwm-workspace-rename-buffer exwm-class-name)) - -;; (use-package exwm -;; :config -;; (setq exwm-workspace-number 5) - -;; ;; These keys will pass through to Emacs -;; (setq exwm-input-prefix-keys -;; '(?\C-x -;; ?\C-u -;; ?\C-h -;; ?\M-x -;; ?\M-` -;; ?\M-& -;; ?\M-: -;; ?\C-\M-j ;; Buffer list -;; ?\C-\ )) ;; Ctrl+Space - -;; ;; This will allow the next key to be sent directly -;; (define-key exwm-mode-map [?\C-q] 'exwm-input-send-next-key) - -;; ;; Set up global key bindings. These always work, no matter the input state! -;; ;; Keep in mind that changing this list after EXWM initializes has no effect. -;; (setq exwm-input-global-keys -;; `( -;; ;; Reset to line-mode (C-c C-k switches to char-mode via exwm-input-release-keyboard) -;; ([?\s-r] . exwm-reset) - -;; ;; Move between windows -;; ([s-h] . windmove-left) -;; ([s-l] . windmove-right) -;; ([s-k] . windmove-up) -;; ([s-j] . windmove-down) - -;; ;; Launch applications via shell command -;; ([?\s-&] . (lambda (command) -;; (interactive (list (read-shell-command "$ "))) -;; (start-process-shell-command command nil command))) - -;; ;; Switch workspace -;; ([?\s-w] . exwm-workspace-switch) - -;; ;; 's-N': Switch to certain workspace with Super (Win) plus a number key (0 - 9) -;; ,@(mapcar (lambda (i) -;; `(,(kbd (format "s-%d" i)) . -;; (lambda () -;; (interactive) -;; (exwm-workspace-switch-create ,i)))) -;; (number-sequence 0 9)))) - -;; (start-process-shell-command "xrandr" nil "") -;; (start-process-shell-command "xmodmap" nil "xmodmap ~/.config/exwm/Xmodmap") - -;; (require 'exwm-randr) -;; (exwm-randr-enable) - -;; (require 'exwm-systemtray) -;; (exwm-systemtray-enable) -;; (exwm-enable)) -(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. - '(custom-safe-themes - '("a9a67b318b7417adbedaab02f05fa679973e9718d9d26075c6235b1f0db703c8" default))) -(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/Emacs.org b/Emacs.org index c609537..6e45b32 100644 --- a/Emacs.org +++ b/Emacs.org @@ -3,7 +3,6 @@ #+PROPERTY: header-args:emacs-lisp :tangle ~/Dotfiles/.config/emacs/init.el :mkdirp yes :lexical yes * Configuration -** Table of Contents :PROPERTIES: :TOC: :include all :depth 3 :force (depth) :ignore (this) :local (depth) :END: @@ -27,11 +26,8 @@ - [[#e-mail][E-Mail]] - [[#irc][IRC]] :END: - ** Package Management I use [[https://github.com/raxod502/straight.el][straight.el]] for managing packages as it's fairly simple and robust. At some point I'd like to move to primarily using Guix for Emacs package management. - -*** Bootstraping straight.el #+begin_src emacs-lisp (setq package-enable-at-startup nil) @@ -71,8 +67,11 @@ I use [[https://github.com/raxod502/straight.el][straight.el]] for managing pack (set-default 'truncate-lines nil) ;; Wrap lines at end of screen (setq visible-bell t) ;; Visible flash to represent a bell (setq x-select-enable-clipboard t) ;; Enable clipboard -(global-tab-line-mode -1) -(setq inhibit-startup-message t) +(global-tab-line-mode -1) ;; Disable tab mode +(setq inhibit-startup-message t) ;; What it says +(setq global-auto-revert-non-file-buffers t) +(global-auto-revert-mode 1) ;; Revert all buffers on change +(setq custom-safe-themes t) ;; Treat themes as safe ;; Disable line mode for specific major/minor modes. (dolist (mode '(org-mode-hook)) @@ -757,7 +756,6 @@ Snippets allow certain files to be filled with a template depending on its filen :config (yas-reload-all)) #+end_src -* Tools ** Eshell #+begin_src emacs-lisp (use-package eshell @@ -868,66 +866,3 @@ Right now I'm pretty happy with Matrix bridging into IRC rooms so this will stay ;; erc-rename-buffers t ;; erc-track-exclude-server-buffer t)) #+end_src -* Window Management (EXWM) -#+begin_src emacs-lisp -;; (defun efs/exwm-update-class () -;; (exwm-workspace-rename-buffer exwm-class-name)) - -;; (use-package exwm -;; :config -;; (setq exwm-workspace-number 5) - -;; ;; These keys will pass through to Emacs -;; (setq exwm-input-prefix-keys -;; '(?\C-x -;; ?\C-u -;; ?\C-h -;; ?\M-x -;; ?\M-` -;; ?\M-& -;; ?\M-: -;; ?\C-\M-j ;; Buffer list -;; ?\C-\ )) ;; Ctrl+Space - -;; ;; This will allow the next key to be sent directly -;; (define-key exwm-mode-map [?\C-q] 'exwm-input-send-next-key) - -;; ;; Set up global key bindings. These always work, no matter the input state! -;; ;; Keep in mind that changing this list after EXWM initializes has no effect. -;; (setq exwm-input-global-keys -;; `( -;; ;; Reset to line-mode (C-c C-k switches to char-mode via exwm-input-release-keyboard) -;; ([?\s-r] . exwm-reset) - -;; ;; Move between windows -;; ([s-h] . windmove-left) -;; ([s-l] . windmove-right) -;; ([s-k] . windmove-up) -;; ([s-j] . windmove-down) - -;; ;; Launch applications via shell command -;; ([?\s-&] . (lambda (command) -;; (interactive (list (read-shell-command "$ "))) -;; (start-process-shell-command command nil command))) - -;; ;; Switch workspace -;; ([?\s-w] . exwm-workspace-switch) - -;; ;; 's-N': Switch to certain workspace with Super (Win) plus a number key (0 - 9) -;; ,@(mapcar (lambda (i) -;; `(,(kbd (format "s-%d" i)) . -;; (lambda () -;; (interactive) -;; (exwm-workspace-switch-create ,i)))) -;; (number-sequence 0 9)))) - -;; (start-process-shell-command "xrandr" nil "") -;; (start-process-shell-command "xmodmap" nil "xmodmap ~/.config/exwm/Xmodmap") - -;; (require 'exwm-randr) -;; (exwm-randr-enable) - -;; (require 'exwm-systemtray) -;; (exwm-systemtray-enable) -;; (exwm-enable)) -#+end_src