Browse Source

Fix literate config

main
parent
commit
b528cd2a17
  1. 22
      README.org
  2. 2
      config/xinitrc
  3. 6
      modules/desktop.el
  4. 3
      modules/writing.el

22
README.org

@ -488,7 +488,13 @@ Open a dired buffer with =SPC d=.
:header-args: :tangle ~/.local/source/dotfiles/modules/desktop.el :results silent :header-args: :tangle ~/.local/source/dotfiles/modules/desktop.el :results silent
:END: :END:
I use Emacs as a Desktop Environment with the [[https://github.com/ch11ng/exwm][exwm]] package. It allows Emacs to function as a complete tiling window manager for =X11=.
I use Emacs as a Desktop Environment with the [[https://github.com/ch11ng/exwm][exwm]] package. It allows Emacs to function as a complete tiling window manager for =X11=. My workflow includes launching the window manager with =xinitrc=, without the use of a display manager, controlling *everything* within Emacs.
#+begin_src conf :tangle ~/.local/source/dotfiles/config/xinitrc
exec dbus-launch --exit-with-session emacs -mm --debug-init
#+end_src
Define a method to run an external process, allowing us to launch any application on a new process without interferring with Emacs.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun dotfiles/run (command) (defun dotfiles/run (command)
@ -505,10 +511,18 @@ Some methods must be called and applied to the current call process in order to
(apply #'call-process `(,(car command-parts) nil 0 nil ,@(cdr command-parts))))) (apply #'call-process `(,(car command-parts) nil 0 nil ,@(cdr command-parts)))))
#+end_src #+end_src
Place keybindings for executing shell commands behind =SPC x=.
+ Run with =x=
+ Run in backround with =g=
+ Run asynchronously with =z=
#+begin_src emacs-lisp #+begin_src emacs-lisp
(dotfiles/leader (dotfiles/leader
"x" '(dotfiles/run :which-key "Execute")
"z" '(async-shell-command :which-key "Async"))
"x" '(:ignore t :which-key "Execute")
"xx" '(dotfiles/run :which-key "Run")
"xb" '(dotfiles/run-in-background :which-key "Run (background)")
"xz" '(async-shell-command :which-key "Async"))
#+end_src #+end_src
When the window manager first launches the ~init-hook~ will be called, this allows us to define some custom logic when it's initialized. When the window manager first launches the ~init-hook~ will be called, this allows us to define some custom logic when it's initialized.
@ -614,7 +628,7 @@ SyncState *
The system typically expects to find this file at ~$HOME/.mbsyncrc~, but you may also specify a custom path if launching the command using arguments. I chose to symlink the default location to my repository. The system typically expects to find this file at ~$HOME/.mbsyncrc~, but you may also specify a custom path if launching the command using arguments. I chose to symlink the default location to my repository.
#+begin_src shell
#+begin_src shell :tangle no
mbsync -a mbsync -a
mu index --maildir="~/.cache/mail" mu index --maildir="~/.cache/mail"
#+end_src #+end_src

2
config/xinitrc

@ -1 +1 @@
exec dbus-launch --exit-with-session emacs -mm --debug-init
exec dbus-launch --exit-with-session emacs -mm --debug-init

6
modules/desktop.el

@ -8,8 +8,10 @@
(apply #'call-process `(,(car command-parts) nil 0 nil ,@(cdr command-parts))))) (apply #'call-process `(,(car command-parts) nil 0 nil ,@(cdr command-parts)))))
(dotfiles/leader (dotfiles/leader
"x" '(dotfiles/run :which-key "Execute")
"z" '(async-shell-command :which-key "Async"))
"x" '(:ignore t :which-key "Execute")
"xx" '(dotfiles/run :which-key "Run")
"xb" '(dotfiles/run-in-background :which-key "Run (background)")
"xz" '(async-shell-command :which-key "Async"))
(defun dotfiles/init-hook () (defun dotfiles/init-hook ()
(exwm-workspace-switch-create 1) (exwm-workspace-switch-create 1)

3
modules/writing.el

@ -185,6 +185,3 @@
"%?" "%?"
:file-name "slides/${slug}" :file-name "slides/${slug}"
:head "#+TITLE: ${title}\n")) :head "#+TITLE: ${title}\n"))
mbsync -a
mu index --maildir="~/.cache/mail"
Loading…
Cancel
Save