diff options
author | shoshin <shoshin@cicadas.surf> | 2022-05-22 20:29:26 -0500 |
---|---|---|
committer | shoshin <shoshin@cicadas.surf> | 2022-05-22 20:29:26 -0500 |
commit | be9e62cadb0954c39a04ea36b19b594325e05908 (patch) | |
tree | 207d893efb4e8f155145b32d7e100ab5fa25cc97 | |
parent | ee122a814fcef73cb36aac172f85df901d1ff487 (diff) |
Fix: emacs 27 package initialization, non-gui tweaks
-rw-r--r-- | shoshin-config.el | 11 | ||||
-rw-r--r-- | shoshin-config.org | 11 |
2 files changed, 16 insertions, 6 deletions
diff --git a/shoshin-config.el b/shoshin-config.el index f14c432..33c7504 100644 --- a/shoshin-config.el +++ b/shoshin-config.el @@ -2,7 +2,9 @@ ;;; Package Management (when (< emacs-major-version 28) - (add-to-list 'package-archives '("nongnu" . "https://elpa.nongnu.org/nongnu/"))) + (package-initialize) + (add-to-list 'package-archives '("nongnu" . "https://elpa.nongnu.org/nongnu/")) + (package-refresh-contents)) (when (and (functionp #'native-comp-available-p) (native-comp-available-p)) (setq native-comp-always-compile t @@ -10,6 +12,7 @@ ;;; Major Keybinding (package-install 'xah-fly-keys) +(require 'xah-fly-keys) (xah-fly-keys-set-layout "qwerty") (setq xah-fly-use-control-key nil xah-fly-use-meta-key nil) @@ -70,8 +73,10 @@ (setq srht-username "shoshin") ;;; User Interface -(scroll-bar-mode nil) -(fringe-mode '(8 . 0)) +(unless (null window-system) + (scroll-bar-mode nil) + (fringe-mode '(8 . 0))) + (tab-bar-mode t) (display-battery-mode t) diff --git a/shoshin-config.org b/shoshin-config.org index 7f07b3c..7d4f51f 100644 --- a/shoshin-config.org +++ b/shoshin-config.org @@ -91,7 +91,9 @@ distributions may not yet have it as an available package. #+name: add-nongnu-elpa #+begin_src emacs-lisp (when (< emacs-major-version 28) - (add-to-list 'package-archives '("nongnu" . "https://elpa.nongnu.org/nongnu/"))) + (package-initialize) + (add-to-list 'package-archives '("nongnu" . "https://elpa.nongnu.org/nongnu/")) + (package-refresh-contents)) #+end_src ** Installing Packages @@ -155,6 +157,7 @@ tightly right now. you may have other opinions about keybindings #+name: keybinding #+begin_src emacs-lisp (package-install 'xah-fly-keys) + (require 'xah-fly-keys) (xah-fly-keys-set-layout "qwerty") (setq xah-fly-use-control-key nil xah-fly-use-meta-key nil) @@ -345,8 +348,10 @@ an API token is stored in my ~.authinfo~ file. ** basic Emacs UI tweaks #+begin_src emacs-lisp - (scroll-bar-mode nil) - (fringe-mode '(8 . 0)) + (unless (null window-system) + (scroll-bar-mode nil) + (fringe-mode '(8 . 0))) + (tab-bar-mode t) (display-battery-mode t) #+end_src |