summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-03-23 08:01:02 +0200
committerThanos Apollo <[email protected]>2023-03-23 08:01:02 +0200
commit11016ec0188ddcee6400e1dd488d99689418d7a2 (patch)
tree626b449996b7c61ff3fc6b1fc6c669f29d9a0928
parent8a85f0b234d66fee8e7e9b5dab45785d54411c97 (diff)
emacs: Add variables for each one of my machines
Add var to check for zeus and hephaestus devices with (system-name)
-rw-r--r--.emacs.d/init.el12
-rwxr-xr-xemacs.org19
2 files changed, 19 insertions, 12 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index 32b46c1..38a9597 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -1,6 +1,9 @@
+(defvar is-zeus (equal (system-name) "zeus"))
+(defvar is-hephaestus (equal (system-name) "hephaestus"))
+
;; When guix t, load emacs packages
-(when (or (equal (system-name) "hephaestus")
- (equal (system-name) "zeus"))
+(when (or is-zeus
+ is-hephaestus
(add-to-list 'load-path "~/.guix-profile/share/emacs/site-lisp")
(guix-emacs-autoload-packages))
@@ -101,8 +104,8 @@ Contains the list of packages that need to be installed.")
(add-to-list 'default-frame-alist '(alpha 100 100))
(add-hook 'dired-mode-hook 'all-the-icons-dired-mode)
-(when (equal (system-name) "hephaestus")
- (display-battery-mode 1))
+(when is-hephaestus
+ (display-battery-mode 0))
(scroll-bar-mode -1)
(tool-bar-mode -1)
@@ -651,7 +654,6 @@ you have the correctly set the OPENAI_API_KEY variable"
(general-define-key
"C-d" 'kill-region
"C-k" 'copy-region-as-kill
- "C-c v" 'multi-vterm-next
"C-x 9" 'make-mini-buffer
"C-c l e" 'apollo/emacs-keys
;;Change keyboard layouts/language
diff --git a/emacs.org b/emacs.org
index f3f1ef9..2a50f52 100755
--- a/emacs.org
+++ b/emacs.org
@@ -5,6 +5,7 @@
#+STARTUP: overview
* Table of contents :TOC:
+- [[#system-information][System information]]
- [[#setting-up-packages][Setting up Packages]]
- [[#setup-for-guixsd-machines][Setup for GuixSD machines]]
- [[#define-and-install-packages][Define and install packages]]
@@ -47,15 +48,20 @@
- [[#mu4e--email-configuration][mu4e | Email Configuration]]
- [[#exwm][EXWM]]
+* System information
+Check the ~$HOSTNAME~, if it's one of my devices running GuixSD.
+#+begin_src emacs-lisp
+ (defvar is-zeus (equal (system-name) "zeus"))
+ (defvar is-hephaestus (equal (system-name) "hephaestus"))
+#+end_src
* Setting up Packages
+
** Setup for GuixSD machines
-We check the ~$HOSTNAME~, if it's one of my devices running GuixSD.
-we use ~guix-emacs-autoload-packages~ to load emacs packages installed using guix if ~t~
+ If you are running GuixSD, replace the following hostnames ~fsociety~ or ~heisenberg~ with your own ~$HOSTNAME~
#+begin_src emacs-lisp
;; When guix t, load emacs packages
- (when (or (equal (system-name) "hephaestus")
- (equal (system-name) "zeus"))
+ (when (or is-zeus
+ is-hephaestus
(add-to-list 'load-path "~/.guix-profile/share/emacs/site-lisp")
(guix-emacs-autoload-packages))
@@ -168,8 +174,8 @@ Fonts and basic appearance settings
(add-to-list 'default-frame-alist '(alpha 100 100))
(add-hook 'dired-mode-hook 'all-the-icons-dired-mode)
- (when (equal (system-name) "hephaestus")
- (display-battery-mode 1))
+ (when is-hephaestus
+ (display-battery-mode 0))
(scroll-bar-mode -1)
(tool-bar-mode -1)
@@ -752,7 +758,6 @@ Hook with ~dired-mode~
(general-define-key
"C-d" 'kill-region
"C-k" 'copy-region-as-kill
- "C-c v" 'multi-vterm-next
"C-x 9" 'make-mini-buffer
"C-c l e" 'apollo/emacs-keys
;;Change keyboard layouts/language