mirror of
https://github.com/pestctrl/emacs-config.git
synced 2026-02-16 08:14:15 +00:00
Only load exwm at the end of the config
Also improved debug interface for Emacs. Rerun the "load full config" prompt in order to jump into minimal emacs next boot.
This commit is contained in:
parent
e842ba6c79
commit
9a2dccbc13
8 changed files with 78 additions and 29 deletions
|
|
@ -264,7 +264,7 @@
|
|||
(interactive)
|
||||
(find-file (notmuch-show-get-filename))))
|
||||
|
||||
(use-package exwm
|
||||
(use-exwm
|
||||
:config
|
||||
(defvar offlineimap-timer nil)
|
||||
(defvar offlineimap-process nil)
|
||||
|
|
@ -871,7 +871,7 @@
|
|||
|
||||
(exwm-global-set-key (kbd "s-s") #'toggle-audio-output)
|
||||
|
||||
(use-package exwm
|
||||
(use-exwm
|
||||
:config
|
||||
(add-hook 'exwm-init-hook #'setup-headphone-stuff))
|
||||
#+end_src
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
#+begin_src emacs-lisp
|
||||
;; This will be the hardest to write :/
|
||||
(when my/enable-exwm
|
||||
(use-package exwm
|
||||
(use-exwm
|
||||
:load-path "~/.emacs.d/submodule/exwm/"
|
||||
:config
|
||||
(use-package exwm-x)
|
||||
|
|
|
|||
|
|
@ -564,7 +564,7 @@
|
|||
;; #'dont-copy-faces-for-x-show-tip))
|
||||
)
|
||||
|
||||
(use-package exwm
|
||||
(use-exwm
|
||||
:config
|
||||
(setq org-noter-always-create-frame nil))
|
||||
#+end_src
|
||||
|
|
|
|||
44
init.el
44
init.el
|
|
@ -1,7 +1,7 @@
|
|||
(add-to-list 'default-frame-alist '(width . 200))
|
||||
(add-to-list 'default-frame-alist '(height . 60))
|
||||
|
||||
(setq package-list '(org use-package exwm))
|
||||
(setq package-list '(org use-package))
|
||||
;; list the repositories containing them
|
||||
(setq package-archives '(("melpa" . "http://melpa.org/packages/")
|
||||
("org" . "https://orgmode.org/elpa/")
|
||||
|
|
@ -63,6 +63,8 @@
|
|||
'face-new-frame-defaults 'face--new-frame-defaults
|
||||
"28.1"))
|
||||
|
||||
(ec/load-or-ask-pred 'my/load-full-config "Do you want to load full config for emacs?")
|
||||
|
||||
;; It is imperative that this be loaded for a nice emacs
|
||||
;; experience. Only SUPER stable stuff goes in this file, and should
|
||||
;; rarely be modified
|
||||
|
|
@ -70,28 +72,32 @@
|
|||
(expand-file-name "config-min.org"
|
||||
user-emacs-directory))
|
||||
|
||||
;; Load additional exwm stuff that changes constantly
|
||||
(when my/enable-exwm
|
||||
(use-package exwm
|
||||
:config
|
||||
(org-babel-load-file
|
||||
(expand-file-name "config-exwm.org"
|
||||
user-emacs-directory))))
|
||||
(when my/load-full-config
|
||||
|
||||
(org-babel-load-file
|
||||
(expand-file-name "config-ext.org"
|
||||
user-emacs-directory))
|
||||
;; Load additional exwm stuff that changes constantly
|
||||
(use-exwm
|
||||
:config
|
||||
(org-babel-load-file
|
||||
(expand-file-name "config-exwm.org"
|
||||
user-emacs-directory)))
|
||||
|
||||
;; Load work stuff when at work.
|
||||
(if my/at-ti
|
||||
(require 'work-config)
|
||||
(org-babel-load-file
|
||||
(expand-file-name "config-org.org"
|
||||
user-emacs-directory)))
|
||||
(expand-file-name "config-ext.org"
|
||||
user-emacs-directory))
|
||||
|
||||
(org-babel-load-file
|
||||
(expand-file-name "my-redefs.org"
|
||||
user-emacs-directory))
|
||||
;; Load work stuff when at work.
|
||||
(if my/at-ti
|
||||
(require 'work-config)
|
||||
(org-babel-load-file
|
||||
(expand-file-name "config-org.org"
|
||||
user-emacs-directory)))
|
||||
|
||||
(org-babel-load-file
|
||||
(expand-file-name "my-redefs.org"
|
||||
user-emacs-directory))
|
||||
|
||||
(when my/enable-exwm
|
||||
(require 'exwm)))
|
||||
|
||||
(setq my/finished t)
|
||||
;; Testing pull from windows
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
(defmacro exwm-global-set-key (keybinding function)
|
||||
`(progn
|
||||
(use-package exwm
|
||||
(use-exwm
|
||||
:config
|
||||
(add-to-list 'exwm-input-global-keys
|
||||
(cons ,keybinding ,function)))
|
||||
(with-eval-after-load "exwm"
|
||||
(add-to-list 'exwm-input-global-keys
|
||||
(cons ,keybinding ,function))))
|
||||
(global-set-key ,keybinding ,function)))
|
||||
|
||||
(exwm-global-set-key (kbd "M-T") 'flop-frame)
|
||||
|
|
@ -17,9 +18,10 @@
|
|||
'my/keymap-key-key
|
||||
"What would you like *root-map* to be bound to?")
|
||||
|
||||
(use-package exwm
|
||||
(use-exwm
|
||||
:config
|
||||
(add-to-list 'exwm-input-prefix-keys my/keymap-key-key))
|
||||
(with-eval-after-load "exwm"
|
||||
(add-to-list 'exwm-input-prefix-keys my/keymap-key-key)))
|
||||
|
||||
;; Disable C-t for all others
|
||||
(with-eval-after-load "dired"
|
||||
|
|
|
|||
|
|
@ -11,4 +11,7 @@
|
|||
(require 'cl)
|
||||
(require 'subr-x)
|
||||
|
||||
;; This is helpful, for exwm-related loading
|
||||
(require 'use-exwm)
|
||||
|
||||
(provide 'libs)
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@
|
|||
(op/refile-to-point (buffer-file-name) location)))))))
|
||||
|
||||
|
||||
(use-package exwm
|
||||
(use-exwm
|
||||
:config
|
||||
(require 'fireorg)
|
||||
|
||||
|
|
|
|||
38
lisp/use-exwm.el
Normal file
38
lisp/use-exwm.el
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
;;; use-exwm.el --- -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2021 Benson Chu
|
||||
|
||||
;; Author: Benson Chu <bensonchu457@gmail.com>
|
||||
;; Created: [2021-08-15 12:55]
|
||||
|
||||
;; This file is not part of GNU Emacs
|
||||
|
||||
;; This program is free software: you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
|
||||
;; This program is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Handling loading of exwm will be handled by init.el. This macro is
|
||||
;; used so I don't accidentally forget to :defer exwm. This way, every
|
||||
;; :config block is automatically wrapped in an eval-after-load block.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(defmacro use-exwm (&rest body)
|
||||
`(use-package exwm
|
||||
:load-path "~/.emacs.d/submodule/exwm"
|
||||
:defer t
|
||||
,@body))
|
||||
|
||||
(provide 'use-exwm)
|
||||
;;; use-exwm.el ends here
|
||||
Loading…
Reference in a new issue