From b89fea8e7f285b12c90117b63a278eaf66061f1b Mon Sep 17 00:00:00 2001 From: ThanosApollo Date: Fri, 24 Feb 2023 14:44:25 +0200 Subject: emacs: update system-names,emojify-mode,elfeed-feeds --- .emacs.d/init.el | 150 +++++++++++++++++++++------------------- emacs.org | 206 +++++++++++++++++++++++++++---------------------------- 2 files changed, 180 insertions(+), 176 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index dfb1220..0f5d21a 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -1,5 +1,6 @@ ;; When guix t, load emacs packages -(when (require 'guix nil 'noerror) +(when (or (equal (system-name) "hephaestus") + (equal (system-name) "zeus")) (add-to-list 'load-path "~/.guix-profile/share/emacs/site-lisp") (guix-emacs-autoload-packages)) @@ -13,54 +14,54 @@ (format "%s <%s>" user-full-name user-mail-address)) (defconst my-package-list '(org-snooze - all-the-icons - all-the-icons-dired - all-the-icons-ivy-rich - dap-mode - toc-org - emojify - general - doom-themes - doom-modeline - counsel - which-key - ivy - ivy-rich - helpful - org - org-modern - visual-fill-column - rainbow-delimiters - flycheck - lsp-mode - lsp-ui - json-mode - rjsx-mode - typescript-mode - python-mode - pyvenv - company - company-box - magit - elfeed - elfeed-goodies - paredit - corfu - monkeytype - sudo-edit - exwm - exwm-mff - exwm-firefox-core - consult - alsamixer - simple-httpd - circe - eshell-syntax-highlighting - pdf-tools - org-superstar - mastodon - dashboard - org-auto-tangle)) + all-the-icons + all-the-icons-dired + all-the-icons-ivy-rich + dap-mode + toc-org + emojify + general + doom-themes + doom-modeline + counsel + which-key + ivy + ivy-rich + helpful + org + org-modern + visual-fill-column + rainbow-delimiters + flycheck + lsp-mode + lsp-ui + json-mode + rjsx-mode + typescript-mode + python-mode + pyvenv + company + company-box + magit + elfeed + elfeed-goodies + paredit + corfu + monkeytype + sudo-edit + exwm + exwm-mff + ;; exwm-firefox-core + consult + alsamixer + simple-httpd + circe + eshell-syntax-highlighting +; pdf-tools + org-superstar + mastodon + dashboard + org-auto-tangle)) (setq package-archives '(("melpa" . "https://melpa.org/packages/") ("org" . "https://orgmode.org/elpa/") @@ -87,7 +88,7 @@ Contains the list of packages that need to be installed.") (setq my-missing-packages '())) (unless (package-installed-p 'use-package) -(package-install 'use-package)) + (package-install 'use-package)) (setq inhibit-startup-message nil) ;; Transparency @@ -96,16 +97,19 @@ Contains the list of packages that need to be installed.") (add-hook 'dired-mode-hook 'all-the-icons-dired-mode) +(display-battery-mode 1) (scroll-bar-mode -1) (tool-bar-mode -1) (tooltip-mode -1) (set-fringe-mode 10) (menu-bar-mode -1) +(which-key-mode 1) (blink-cursor-mode -1) (menu-bar--visual-line-mode-enable) +(global-visual-line-mode 1) (require 'emojify) -(emojify-mode 1) +(global-emojify-mode 1) (setq visible-bell t) @@ -316,7 +320,7 @@ Contains the list of packages that need to be installed.") ;; Check if it's one of my guix systems to load from ;; ~/.guix-profile. Otherwise we use /bin/zsh. (if - (or (string= (system-name) "fsociety") + (or (string= (system-name) "hephaestus") (string= (system-name) "heisenberg")) (setq vterm-shell "~/.guix-profile/bin/bash") (setq vterm-shell "/bin/zsh"))) @@ -647,7 +651,8 @@ you have the correctly set the OPENAI_API_KEY variable" "c" 'apollo/center-buffer "m" 'mu4e "f" 'elfeed - "C-t" 'telega) + "C-t" 'telega + "g" 'guix) ;;pdf-tools (general-define-key @@ -868,24 +873,20 @@ you have the correctly set the OPENAI_API_KEY variable" (require 'elfeed) (require 'elfeed-goodies) - (setq elfeed-feeds (quote - ( - ("https://hackaday.com/blog/feed/" hackaday linux) - ("https://opensource.com/feed" opensource linux) - ("https://linux.softpedia.com/backend.xml" softpedia linux) - ("https://www.thelancet.com/rssfeed/lancet_current.xml" Lancet lancet) - ("https://www.thelancet.com/rssfeed/lancet_online.xml" LancetOnline lancet) - ("https://www.thelancet.com/rssfeed/lanmic_online.xml" LancetOnline Microbiology) - ("https://www.techrepublic.com/rssfeeds/topic/open-source/" techrepublic linux) + ( + ("https://hackaday.com/blog/feed/" hackaday linux) ("https://www.thanosapollo.com/public/feed.xml" Thanos) ("https://protesilaos.com/news.xml" Protesilaos News) ("https://protesilaos.com/codelog.xml" Proetesilaos Coding) - ("https://stallman.org/rss/rss.xml" Stallman news) - ))) + ("https://guix.gnu.org/feeds/blog.atom" Guix Blog) + ("https://rss.nytimes.com/services/xml/rss/nyt/World.xml" NYT World) + ("https://rss.nytimes.com/services/xml/rss/nyt/Technology.xml" NYT Tech) + ("https://rss.nytimes.com/services/xml/rss/nyt/Science.xml" NYT Science) + ("https://rss.nytimes.com/services/xml/rss/nyt/Health.xml" NYT Health)))) -(setq elfeed-goodies/entry-pane-size 0.5) -(add-hook 'elfeed-goodies/setup 'elfeed) +(setq elfeed-goodies/entry-pane-size 0.7) +(add-hook 'elfeed-update 'elfeed-goodies/setup) ;;Add pdf-isearch-minor-mode hook, otherwise isearch will be buggy ;;Darkmode hook, cause I don't want color or light in my life, I'm a vampire. @@ -901,10 +902,6 @@ you have the correctly set the OPENAI_API_KEY variable" :config (setq telega-server-libs-prefix "/opt/homebrew/Cellar/tdlib/HEAD-3d0140b"))) -;; In macOS, load mu4e through homebrew -(when (equal system-type 'darwin) - (use-package mu4e - :load-path "/opt/homebrew/share/emacs/site-lisp/mu/mu4e/")) ;; Check if we have mu4e available ;; if t load mu4e settings (when (require 'mu4e nil 'noerror) @@ -964,3 +961,16 @@ you have the correctly set the OPENAI_API_KEY variable" (setq message-send-mail-function 'smtpmail-send-it smtpmail-stream-type 'ssl)) +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(package-selected-packages + '(desktop-environment telega magit-popup geiser-guile edit-indirect tablist diminish ement yaml-mode which-key weblorg typescript-mode toc-org sudo-edit simple-httpd sicp rjsx-mode rainbow-delimiters quelpa-use-package pyvenv python-mode paredit org-superstar org-snooze org-modern org-make-toc org-auto-tangle monkeytype mastodon magit lsp-ui json-mode helpful haskell-mode general flycheck fancy-battery exwm-mff exwm-firefox-core eshell-syntax-highlighting emojify elfeed-goodies doom-themes doom-modeline dashboard dap-mode counsel corfu consult company-box circe alsamixer all-the-icons-ivy-rich all-the-icons-dired))) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + ) diff --git a/emacs.org b/emacs.org index a573d6f..717bae5 100644 --- a/emacs.org +++ b/emacs.org @@ -40,7 +40,6 @@ - [[#javascript][Javascript]] - [[#elfeed][Elfeed]] - [[#feeds][Feeds]] - - [[#settings-2][Settings]] - [[#pdf][PDF]] - [[#telega][Telega]] - [[#mu4e--email-configuration][mu4e | Email Configuration]] @@ -53,7 +52,8 @@ we use ~guix-emacs-autoload-packages~ to load emacs packages installed using gui + 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 (require 'guix nil 'noerror) + (when (or (equal (system-name) "hephaestus") + (equal (system-name) "zeus")) (add-to-list 'load-path "~/.guix-profile/share/emacs/site-lisp") (guix-emacs-autoload-packages)) @@ -70,85 +70,85 @@ we use ~guix-emacs-autoload-packages~ to load emacs packages installed using gui *** List of required packages Request the following packages: #+begin_src emacs-lisp - (defconst my-package-list '(org-snooze - all-the-icons - all-the-icons-dired - all-the-icons-ivy-rich - dap-mode - toc-org - emojify - general - doom-themes - doom-modeline - counsel - which-key - ivy - ivy-rich - helpful - org - org-modern - visual-fill-column - rainbow-delimiters - flycheck - lsp-mode - lsp-ui - json-mode - rjsx-mode - typescript-mode - python-mode - pyvenv - company - company-box - magit - elfeed - elfeed-goodies - paredit - corfu - monkeytype - sudo-edit - exwm - exwm-mff - exwm-firefox-core - consult - alsamixer - simple-httpd - circe - eshell-syntax-highlighting - pdf-tools - org-superstar - mastodon - dashboard - org-auto-tangle)) + (defconst my-package-list '(org-snooze + all-the-icons + all-the-icons-dired + all-the-icons-ivy-rich + dap-mode + toc-org + emojify + general + doom-themes + doom-modeline + counsel + which-key + ivy + ivy-rich + helpful + org + org-modern + visual-fill-column + rainbow-delimiters + flycheck + lsp-mode + lsp-ui + json-mode + rjsx-mode + typescript-mode + python-mode + pyvenv + company + company-box + magit + elfeed + elfeed-goodies + paredit + corfu + monkeytype + sudo-edit + exwm + exwm-mff + ;; exwm-firefox-core + consult + alsamixer + simple-httpd + circe + eshell-syntax-highlighting + ; pdf-tools + org-superstar + mastodon + dashboard + org-auto-tangle)) #+end_src *** Installation & activation Set our ~package-archives~, and install our packages #+begin_src emacs-lisp -(setq package-archives '(("melpa" . "https://melpa.org/packages/") - ("org" . "https://orgmode.org/elpa/") - ("elpa" . "https://elpa.gnu.org/packages/"))) -(package-initialize) -(unless package-archive-contents - (package-refresh-contents)) - -(defvar my-missing-packages '() - "List populated at each startup. -Contains the list of packages that need to be installed.") - -(dolist (p my-package-list) - (when (not (package-installed-p p)) - (add-to-list 'my-missing-packages p))) - -(when my-missing-packages - (message "Emacs is now refreshing its package database...") - (package-refresh-contents) - ;; Install the missing packages - (dolist (p my-missing-packages) - (message "Installing `%s' .." p) - (package-install p)) - (setq my-missing-packages '())) - -(unless (package-installed-p 'use-package) -(package-install 'use-package)) + (setq package-archives '(("melpa" . "https://melpa.org/packages/") + ("org" . "https://orgmode.org/elpa/") + ("elpa" . "https://elpa.gnu.org/packages/"))) + (package-initialize) + (unless package-archive-contents + (package-refresh-contents)) + + (defvar my-missing-packages '() + "List populated at each startup. + Contains the list of packages that need to be installed.") + + (dolist (p my-package-list) + (when (not (package-installed-p p)) + (add-to-list 'my-missing-packages p))) + + (when my-missing-packages + (message "Emacs is now refreshing its package database...") + (package-refresh-contents) + ;; Install the missing packages + (dolist (p my-missing-packages) + (message "Installing `%s' .." p) + (package-install p)) + (setq my-missing-packages '())) + + (unless (package-installed-p 'use-package) + (package-install 'use-package)) #+end_src * UI Settings @@ -162,16 +162,19 @@ Fonts and basic appearance settings (add-hook 'dired-mode-hook 'all-the-icons-dired-mode) + (display-battery-mode 1) (scroll-bar-mode -1) (tool-bar-mode -1) (tooltip-mode -1) (set-fringe-mode 10) (menu-bar-mode -1) + (which-key-mode 1) (blink-cursor-mode -1) (menu-bar--visual-line-mode-enable) + (global-visual-line-mode 1) (require 'emojify) - (emojify-mode 1) + (global-emojify-mode 1) (setq visible-bell t) @@ -402,7 +405,7 @@ Hook with ~dired-mode~ ;; Check if it's one of my guix systems to load from ;; ~/.guix-profile. Otherwise we use /bin/zsh. (if - (or (string= (system-name) "fsociety") + (or (string= (system-name) "hephaestus") (string= (system-name) "heisenberg")) (setq vterm-shell "~/.guix-profile/bin/bash") (setq vterm-shell "/bin/zsh"))) @@ -745,7 +748,8 @@ Hook with ~dired-mode~ "c" 'apollo/center-buffer "m" 'mu4e "f" 'elfeed - "C-t" 'telega) + "C-t" 'telega + "g" 'guix) ;;pdf-tools (general-define-key @@ -1004,28 +1008,22 @@ Hook with ~dired-mode~ * Elfeed ** Feeds #+begin_src emacs-lisp -(require 'elfeed) -(require 'elfeed-goodies) - -(setq elfeed-feeds (quote - ( - ("https://hackaday.com/blog/feed/" hackaday linux) - ("https://opensource.com/feed" opensource linux) - ("https://linux.softpedia.com/backend.xml" softpedia linux) - ("https://www.thelancet.com/rssfeed/lancet_current.xml" Lancet lancet) - ("https://www.thelancet.com/rssfeed/lancet_online.xml" LancetOnline lancet) - ("https://www.thelancet.com/rssfeed/lanmic_online.xml" LancetOnline Microbiology) - ("https://www.techrepublic.com/rssfeeds/topic/open-source/" techrepublic linux) - ("https://www.thanosapollo.com/public/feed.xml" Thanos) - ("https://protesilaos.com/news.xml" Protesilaos News) - ("https://protesilaos.com/codelog.xml" Proetesilaos Coding) - ("https://stallman.org/rss/rss.xml" Stallman news) - ))) -#+end_src -** Settings -#+begin_src emacs-lisp - (setq elfeed-goodies/entry-pane-size 0.5) - (add-hook 'elfeed-goodies/setup 'elfeed) + (require 'elfeed) + (require 'elfeed-goodies) + (setq elfeed-feeds (quote + ( + ("https://hackaday.com/blog/feed/" hackaday linux) + ("https://www.thanosapollo.com/public/feed.xml" Thanos) + ("https://protesilaos.com/news.xml" Protesilaos News) + ("https://protesilaos.com/codelog.xml" Proetesilaos Coding) + ("https://guix.gnu.org/feeds/blog.atom" Guix Blog) + ("https://rss.nytimes.com/services/xml/rss/nyt/World.xml" NYT World) + ("https://rss.nytimes.com/services/xml/rss/nyt/Technology.xml" NYT Tech) + ("https://rss.nytimes.com/services/xml/rss/nyt/Science.xml" NYT Science) + ("https://rss.nytimes.com/services/xml/rss/nyt/Health.xml" NYT Health)))) + + (setq elfeed-goodies/entry-pane-size 0.7) + (add-hook 'elfeed-update 'elfeed-goodies/setup) #+end_src * PDF #+begin_src emacs-lisp @@ -1052,10 +1050,6 @@ In macOS, I have installed it through homebrew. * mu4e | Email Configuration #+begin_src emacs-lisp - ;; In macOS, load mu4e through homebrew - (when (equal system-type 'darwin) - (use-package mu4e - :load-path "/opt/homebrew/share/emacs/site-lisp/mu/mu4e/")) ;; Check if we have mu4e available ;; if t load mu4e settings (when (require 'mu4e nil 'noerror) -- cgit v1.2.3