Browse Source

Cleanup bindings

main
parent
commit
80ebd5a035
  1. 21
      README.org
  2. 17
      init.el

21
README.org

@ -22,7 +22,12 @@ Immutable GNU Emacs dotfiles, inspired by Doom, built for Liberty.
+ 100% Immutable + 100% Immutable
+ 100% Reproducible + 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) (defun dotfiles/tangle (dir)
"Recursively tangle the Org files within a directory." "Recursively tangle the Org files within a directory."
(interactive) (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))))) (apply #'call-process `(,(car command-parts) nil 0 nil ,@(cdr command-parts)))))
#+end_src #+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 #+begin_src emacs-lisp
(dotfiles/leader (dotfiles/leader
"x" '(dotfiles/run :which-key "Execute"))
"x" '(dotfiles/run :which-key "Execute")
"z" '(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.
@ -445,7 +441,6 @@ Using =autorandr= with pre configured profiles, switching screens (AKA hot plugg
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun dotfiles/update-display () (defun dotfiles/update-display ()
(dotfiles/run-in-background "autorandr --change --force")) (dotfiles/run-in-background "autorandr --change --force"))
;; (dotfiles/set-wallpaper "TODO"))
#+end_src #+end_src
Finally we configure the window manager. Finally we configure the window manager.

17
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/home user-emacs-directory)
(defvar dotfiles/cache "~/.cache/emacs") (defvar dotfiles/cache "~/.cache/emacs")
@ -174,14 +167,9 @@
(let ((command-parts (split-string command "[ ]+"))) (let ((command-parts (split-string command "[ ]+")))
(apply #'call-process `(,(car command-parts) nil 0 nil ,@(cdr command-parts))))) (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 (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 () (defun dotfiles/init-hook ()
(exwm-workspace-switch-create 1) (exwm-workspace-switch-create 1)
@ -191,7 +179,6 @@
(defun dotfiles/update-display () (defun dotfiles/update-display ()
(dotfiles/run-in-background "autorandr --change --force")) (dotfiles/run-in-background "autorandr --change --force"))
;; (dotfiles/set-wallpaper "TODO"))
(use-package exwm (use-package exwm
:config :config

Loading…
Cancel
Save