Refactored

This commit is contained in:
opal
2021-12-26 15:05:34 -08:00
parent 16c8b1abbe
commit c0a14febd5
2 changed files with 10 additions and 146 deletions

View File

@@ -32,8 +32,11 @@
(set-default 'truncate-lines nil) ;; Wrap lines at end of screen (set-default 'truncate-lines nil) ;; Wrap lines at end of screen
(setq visible-bell t) ;; Visible flash to represent a bell (setq visible-bell t) ;; Visible flash to represent a bell
(setq x-select-enable-clipboard t) ;; Enable clipboard (setq x-select-enable-clipboard t) ;; Enable clipboard
(global-tab-line-mode -1) (global-tab-line-mode -1) ;; Disable tab mode
(setq inhibit-startup-message t) (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. ;; Disable line mode for specific major/minor modes.
(dolist (mode '(org-mode-hook)) (dolist (mode '(org-mode-hook))
@@ -678,77 +681,3 @@
;; erc-interpret-mirc-color t ;; erc-interpret-mirc-color t
;; erc-rename-buffers t ;; erc-rename-buffers t
;; erc-track-exclude-server-buffer 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.
)

View File

@@ -3,7 +3,6 @@
#+PROPERTY: header-args:emacs-lisp :tangle ~/Dotfiles/.config/emacs/init.el :mkdirp yes :lexical yes #+PROPERTY: header-args:emacs-lisp :tangle ~/Dotfiles/.config/emacs/init.el :mkdirp yes :lexical yes
* Configuration * Configuration
** Table of Contents
:PROPERTIES: :PROPERTIES:
:TOC: :include all :depth 3 :force (depth) :ignore (this) :local (depth) :TOC: :include all :depth 3 :force (depth) :ignore (this) :local (depth)
:END: :END:
@@ -27,11 +26,8 @@
- [[#e-mail][E-Mail]] - [[#e-mail][E-Mail]]
- [[#irc][IRC]] - [[#irc][IRC]]
:END: :END:
** Package Management ** 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. 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 #+begin_src emacs-lisp
(setq package-enable-at-startup nil) (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 (set-default 'truncate-lines nil) ;; Wrap lines at end of screen
(setq visible-bell t) ;; Visible flash to represent a bell (setq visible-bell t) ;; Visible flash to represent a bell
(setq x-select-enable-clipboard t) ;; Enable clipboard (setq x-select-enable-clipboard t) ;; Enable clipboard
(global-tab-line-mode -1) (global-tab-line-mode -1) ;; Disable tab mode
(setq inhibit-startup-message t) (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. ;; Disable line mode for specific major/minor modes.
(dolist (mode '(org-mode-hook)) (dolist (mode '(org-mode-hook))
@@ -757,7 +756,6 @@ Snippets allow certain files to be filled with a template depending on its filen
:config :config
(yas-reload-all)) (yas-reload-all))
#+end_src #+end_src
* Tools
** Eshell ** Eshell
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package eshell (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-rename-buffers t
;; erc-track-exclude-server-buffer t)) ;; erc-track-exclude-server-buffer t))
#+end_src #+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