diff --git a/README.org b/README.org index 2ed3ec2..990aea0 100644 --- a/README.org +++ b/README.org @@ -22,7 +22,12 @@ Immutable GNU Emacs dotfiles, inspired by Doom, built for Liberty. + 100% Immutable + 100% Reproducible -#+begin_src emacs-lisp :tangle ~/.local/source/dotfiles/init.el :results silent +#+begin_src emacs-lisp +(defconst IS-LINUX (eq system-type 'gnu/linux)) +(defconst IS-WINDOWS (memq system-type '(cygwin ms-dos windows-nt))) +#+end_src + +#+begin_src emacs-lisp (defun dotfiles/tangle (dir) "Recursively tangle the Org files within a directory." (interactive) @@ -410,19 +415,10 @@ 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))))) #+end_src -Setting the wallpaper is one example; this must occur every time the screen change hook is called. - -#+begin_src emacs-lisp -;; (defun dotfiles/set-wallpaper (path) -;; (interactive) -;; (when (file-exists-p path) -;; (let ((command (concat "feh --bg-scale " path))) -;; (start-process-shell-command "feh" nil command)))) -#+end_src - #+begin_src emacs-lisp (dotfiles/leader - "x" '(dotfiles/run :which-key "Execute")) + "x" '(dotfiles/run :which-key "Execute") + "z" '(async-shell-command :which-key "Async")) #+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. @@ -445,7 +441,6 @@ Using =autorandr= with pre configured profiles, switching screens (AKA hot plugg #+begin_src emacs-lisp (defun dotfiles/update-display () (dotfiles/run-in-background "autorandr --change --force")) - ;; (dotfiles/set-wallpaper "TODO")) #+end_src Finally we configure the window manager. diff --git a/init.el b/init.el index 914e9e0..b4bd506 100644 --- a/init.el +++ b/init.el @@ -1,10 +1,3 @@ -(defun dotfiles/tangle (dir) - "Recursively tangle the Org files within a directory." - (interactive) - (let ((org-files (directory-files-recursively dir "org"))) - (dolist (f org-files) - (org-babel-tangle-file f)))) - (defvar dotfiles/home user-emacs-directory) (defvar dotfiles/cache "~/.cache/emacs") @@ -174,14 +167,9 @@ (let ((command-parts (split-string command "[ ]+"))) (apply #'call-process `(,(car command-parts) nil 0 nil ,@(cdr command-parts))))) -;; (defun dotfiles/set-wallpaper (path) -;; (interactive) -;; (when (file-exists-p path) -;; (let ((command (concat "feh --bg-scale " path))) -;; (start-process-shell-command "feh" nil command)))) - (dotfiles/leader - "x" '(dotfiles/run :which-key "Execute")) + "x" '(dotfiles/run :which-key "Execute") + "z" '(async-shell-command :which-key "Async")) (defun dotfiles/init-hook () (exwm-workspace-switch-create 1) @@ -191,7 +179,6 @@ (defun dotfiles/update-display () (dotfiles/run-in-background "autorandr --change --force")) - ;; (dotfiles/set-wallpaper "TODO")) (use-package exwm :config