summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--blendoit/blendoit-init.org70
-rw-r--r--blendoit/blendoit-sidebar.el.bkp (renamed from blendoit/blendoit-sidebar.el)4
-rw-r--r--blendoit/init-bootstrap.el13
-rw-r--r--img/Safran_logo.svg (renamed from blendoit/img/Safran_logo.svg)0
-rw-r--r--img/logo-blendux.png (renamed from blendoit/img/logo-blendux.png)bin99153 -> 99153 bytes
-rw-r--r--img/logo-blendux_smaller.png (renamed from blendoit/img/logo-blendux_smaller.png)bin26441 -> 26441 bytes
-rw-r--r--init.el36
-rw-r--r--themes/blendoit-light-theme.el (renamed from blendoit/themes/blendoit-light-theme.el)0
8 files changed, 62 insertions, 61 deletions
diff --git a/blendoit/blendoit-init.org b/blendoit/blendoit-init.org
index 2125246..19b2755 100644
--- a/blendoit/blendoit-init.org
+++ b/blendoit/blendoit-init.org
@@ -4,8 +4,8 @@
#+EMAIL: blendoit@gmail.com
#+STARTUP: showall customtime
-#+SETUPFILE: ~/.emacs.d/templates/documents/general.org
-#+INCLUDE: ~/.emacs.d/templates/documents/general.org_title
+# #+SETUPFILE: ~/.emacs.d/templates/documents/general.org
+# #+INCLUDE: ~/.emacs.d/templates/documents/general.org_title
\begin{abstract}
GNU Emacs is most often used as a text editor.
@@ -99,30 +99,17 @@ Makes opening emacs faster for following instances.
; (setq initial-buffer-choice (lambda () (get-buffer "*dashboard*")))
#+END_SRC
-** Refresh configuration
-
-Add an ~after-save-hook~ that tangles and loads this literary configuration.
-
-# #+NAME: emacs-client
-# #+BEGIN_SRC emacs-lisp
-# (defun my/tangle-and-load-blendoit-init()
-# (org-babel-load-file "~/.emacs.d/blendoit/blendoit-init.org")
-# )
-
-# (add-hook 'after-save-hook 'my/tangle-and-load-blendoit-init)
-
-# (my/tangle-and-load-blendoit-init)
-# #+END_SRC
-
** Custom file
Load settings created automatically by GNU Emacs Custom. (For example, any
clickable option/toggle is saved here.) Useful for fooling around with M-x
customize-group <package>.
+user-emacs-directory
+
#+NAME: custom-file-location
#+BEGIN_SRC emacs-lisp
- (setq custom-file "~/.emacs.d/init-custom.el")
+ (setq custom-file (concat user-emacs-directory "init-custom.el"))
(load custom-file)
#+END_SRC
@@ -145,7 +132,7 @@ We begin by defining a user shortcut to this very file:
(defun find-init-blendoit ()
"Jump to this very file."
(interactive)
- (find-file "~/.emacs.d/blendoit/blendoit-init.org"))
+ (find-file my/literate-config))
(global-set-key (kbd "C-c c") 'find-init-blendoit)
#+END_SRC
@@ -270,6 +257,8 @@ configuration file.
(package-install 'use-package)
(eval-when-compile (require 'use-package)))
(setq use-package-always-ensure t)
+(require 'use-package)
+(use-package bind-key)
#+END_SRC
** TODO Convenient package update
@@ -339,7 +328,7 @@ Org base directory is in user home on GNU/Linux, or in =AppData= in MS Windows.
#+NAME: org-basic
#+BEGIN_SRC emacs-lisp
- (setq org-directory "~/org")
+ (setq org-directory (concat user-emacs-directory "~/org"))
#+END_SRC
First, we hide markup symbols for *bold*, /italic/, _underlined_ and +strikethrough+
@@ -351,7 +340,7 @@ them corrupts tables.
#+NAME: org-basic
#+BEGIN_SRC emacs-lisp
- (setq org-hide-emphasis-markers t)
+ (setq org-hide-emphasis-markers nil)
(setq org-startup-indented t)
#+END_SRC
@@ -497,23 +486,6 @@ LaTeX \rightarrow PDF.
("C-c C" . ledger-mode-clean-buffer))
#+END_SRC
-** ibuffer-sidebar
-
-#+BEGIN_SRC emacs-lisp
- ;; (use-package ibuffer-sidebar)
- ;; (ibuffer-sidebar-show-sidebar)
-
- ; :bind ("mouse-1" . ibuffer-mouse-visit-buffer)
- ; :bind ("mouse-3" . ibuffer-mouse-toggle-mark))
-
- ; (add-hook 'ibuffer-sidebar-mode-hook
- ; (lambda ()
- ; (local-unset-key (quote mouse-1))
- ; (local-unset-key (quote mouse-2))
- ; (local-set-key (quote mouse-1) (quote ibuffer-mouse-visit-buffer))
- ; (local-set-key (quote mouse-2) (quote ibuffer-mouse-toggle-mark))))
-#+END_SRC
-
** TODO Sidebar
Get inspiration from ~ibuffer-sidebar~ and create a better sidebar.
@@ -588,7 +560,7 @@ We replace the standard welcome screen with our own.
(use-package dashboard
:config
(dashboard-setup-startup-hook)
- (setq dashboard-startup-banner "~/.emacs.d/blendoit/img/Safran_logo.svg")
+ (setq dashboard-startup-banner (concat user-emacs-directory "img/Safran_logo.svg"))
(setq dashboard-items '((recents . 5)
(projects . 5)))
(setq dashboard-banner-logo-title "A modern professional text editor."))
@@ -712,7 +684,7 @@ GNU/Linux. Frame transparency increases when focus is lost.
My custom themes.
#+BEGIN_SRC emacs-lisp
-(setq custom-theme-directory "~/.emacs.d/blendoit/themes/")
+(setq custom-theme-directory (concat user-emacs-directory "themes/"))
(load-theme 'blendoit-light)
; (load-theme 'blendoit-dark)
#+END_SRC
@@ -761,6 +733,24 @@ Save cursor location in visited buffer after closing it or Emacs.
(save-place-mode 1)
#+END_SRC
+Saving any file in ~user-emacs-directory~ (by default on Emacs, =~/emacs.d=)
+shall byte-recompile the entire =.emacs/= directory, for increased speed.
+
+This is pretty neat, not gonna lie.
+
+#+BEGIN_SRC emacs-lisp
+ (defun my/byte-compile-user-config ()
+ "Byte-compile dotfiles if current file is in `user-emacs-directory'.
+ Also tangles `my-literate-config'."
+ (interactive)
+ (if (string-equal buffer-file-name my/literate-config)
+ (org-babel-tangle))
+ (if (string-prefix-p user-emacs-directory default-directory)
+ (byte-recompile-directory user-emacs-directory 0)))
+
+ (add-hook 'after-save-hook my/byte-compile-user-config)
+#+END_SRC
+
** Clean up menus
Originally, I wished to inhibit certain entries in the GUI menus. Not worth the
diff --git a/blendoit/blendoit-sidebar.el b/blendoit/blendoit-sidebar.el.bkp
index 03d1708..8677083 100644
--- a/blendoit/blendoit-sidebar.el
+++ b/blendoit/blendoit-sidebar.el.bkp
@@ -8,12 +8,12 @@
;; Keywords: multimedia, frobnicate
;; URL: http://example.com/jrhacker/superfrobnicate
-...
-
;; Commentary:
;; This package provides an auto-hiding sidebar with a list of open buffers.
+;; Code:
+
;;;###autoload
(define-minor-mode blendoit-sidebar-mode)
diff --git a/blendoit/init-bootstrap.el b/blendoit/init-bootstrap.el
deleted file mode 100644
index 507ebda..0000000
--- a/blendoit/init-bootstrap.el
+++ /dev/null
@@ -1,13 +0,0 @@
-;;; init-bootstrap.el --- load main Emacs config from USB drive.
-
-;;; Commentary:
-;; This package enables the bootstrapping of a full `.emacs.d/' configuration
-;; residing on a removable drive. It is copied over from init-bootstrap.el to
-;; init.el, at a location the OS expects to find that file. Then, every time
-;; Emacs is started, it will scan the top level of all typical mount points in
-;; an effort to detect an existing `.emacs.d/'.
-
-;;; Code:
-
-(provide 'init-bootstrap)
-;;; init-bootstrap.el ends here
diff --git a/blendoit/img/Safran_logo.svg b/img/Safran_logo.svg
index 12ae8e3..12ae8e3 100644
--- a/blendoit/img/Safran_logo.svg
+++ b/img/Safran_logo.svg
diff --git a/blendoit/img/logo-blendux.png b/img/logo-blendux.png
index 36280ea..36280ea 100644
--- a/blendoit/img/logo-blendux.png
+++ b/img/logo-blendux.png
Binary files differ
diff --git a/blendoit/img/logo-blendux_smaller.png b/img/logo-blendux_smaller.png
index 84d0520..84d0520 100644
--- a/blendoit/img/logo-blendux_smaller.png
+++ b/img/logo-blendux_smaller.png
Binary files differ
diff --git a/init.el b/init.el
index 209bf9a..950628b 100644
--- a/init.el
+++ b/init.el
@@ -1,14 +1,38 @@
-;;; init.el --- First file ran by GNU Emacs.
+;;; init.el --- bootstrap main Emacs config from USB drive.
;;; Commentary:
-
-;; Load literate configuration file I created for GNU Emacs.
-;; The ultimate goal is to transition most of the custom settings
-;; to explicitly defined customisations.
+;; This package enables bootstrapping a full `.emacs.d/' configuration
+;; residing on a removable drive. It is copied over from
+;; init-bootstrap.el to init.el, at a location the OS expects to find
+;; that file. Then, every time Emacs is started, it will scan the top
+;; level of all typical mount points in an effort to detect an
+;; existing `.emacs.d/'.
;;; Code:
+(setq user-emacs-directory "/run/media/blendux/1924-4A2F/dotemacs/")
+(setq my/literate-config (concat user-emacs-directory "blendoit/blendoit-init.org"))
+(setq my/literate-config-compiled (concat user-emacs-directory "blendoit/blendoit-init.elc"))
+
+(defun my/load-config-linux ()
+ "Bootstrap a full `.emacs.d/' configuration for GNU/Linux."
+ (load-file my/literate-config-compiled)
+ (message "It worked. Take a break."))
+
+(defun my/load-config-windows ()
+ "Bootstrap a full `.emacs.d/' configuration for MS Windows."
+(let* 'alphabet (mapcar 'string "ABCDEFFGHIJKLMNOPQRSTUVWXYZ")
+ 'drives (mapcar '(lambda (drive)
+ "Construct list of drives."
+ (concat drive ":")) alphabet))
+
+
+ (setq user-emacs-directory config-location)
+)
-(org-babel-load-file "~/.emacs.d/blendoit/blendoit-init.org")
+;; Perform the configuration bootstrap, per the running OS.
+(cond ((string-equal system-type "gnu/linux") (my/load-config-linux))
+ ((string-equal system-type "windows-nt") (my/load-config-window))
+ (t (message "You're running neither GNU/Linux nor MS Windows.")))
(provide 'init)
diff --git a/blendoit/themes/blendoit-light-theme.el b/themes/blendoit-light-theme.el
index 033881a..033881a 100644
--- a/blendoit/themes/blendoit-light-theme.el
+++ b/themes/blendoit-light-theme.el
Copyright 2019--2024 Marius PETER