Sun 22 Dec 2024 13:51:09 GMT - 1734875469
I've Been Using DOOM/EMACS/EXWM for almost a year.
The latest waist of time was replacing COMPANY with CORFU. Both are just massive CPU hog's and slow Emacs down so much it becomes nonfunctional also/also it makes using it excruciating and annoying annoy, your constantly waiting for it to finish doing spell-y type things in the background over thousands of lines. I Nuked most of that.
I've just removed all the auto spell stuff; Emacs is so much better without it.
RTFM!
Start over, in case something went terribly wrong?
Delete $EMACSDIR/.local/straight and run $ doom sync.
And then I just uninstalled everything and started again.
So san's complaining about the speed of emacs I don't think I've used a +more better operating system. Dealing with external GUI's is a bit clunky at times but if I'm desperate I just login to DWM and wish my DWM-config had all my doom/emacs shortcuts; I tie my fingers in knots! I'm adapting to a more cli way of doing basic shit rather than opening a file manager; which is cool!
I've got rid of the mode-line entirely.
I've got rid of auto spelling et-al: Also/Mostly.
-Installed tint2, a bar is always handy-
Got rid of tint2 in favour of Polybar; so far so good. It's reasonably unobtrusive. I like to see the time and have a volume gadget, sorting out XF86AudioSOUNDTHINGY has always been in the lap of the god's amixer set -q pactl set-sink #FAQFLU just discovered SPC s-i by mistake (wow that's good).
I Shall Not Sojourn
My config is now complete! Until Tomorrow.
At this point I'm primarily intrested in short cut keys so most of this config is really just fannying about. Some of it has been marked DONE some of it TODO. Org-mode really is good.
HAVING A TXT BASED OPERATING SYSTEM REALLY MAKES QUITE A LOT OF SENSE.
Now that I've got rid of a lot of background spelling bloat I'm actively having to think about words rather than so half arse AI doing for me, that can't be bad thing right?
Any way toggling spell-fu highlights all the wronger spelling and it can always be toggled off...
Most of this works?
Most of this works, I think? Everything boots up and works for me, so if something isn't completely right I don't care.
(Setq fancy-splash-image "~/Pictures/pinksquid.png")
(add-hook! '+doom-dashboard-functions :append
(assoc-delete-all "Open org-agenda" +doom-dashboard-menu-sections)
(assoc-delete-all "Open project" +doom-dashboard-menu-sections)
(assoc-delete-all "Reload last session" +doom-dashboard-menu-sections)
(assoc-delete-all "Open private configuration" +doom-dashboard-menu-sections)
(insert "** " (+doom-dashboard--center +doom-dashboard--width "I BELIVE!"))
(insert "\n" (+doom-dashboard--center +doom-dashboard--width "dsfadsfgafgf@soviet.circumlunar.space")))
;; Start EXWM
(add-to-list 'load-path "/usr/share/emacs/site-lisp/exwm")
(require 'exwm)
;; AUTOSTART SOME SHIT!
(use-package exwm
:config
(setq exwm-init-hook
(lambda ()
;; POINTLESS BOOTUP SOUND
; (start-process-shell-command "paplay" nil "paplay ~/Music/bootup-sounds/8-bit-bootup.mp3")
(start-process-shell-command "feh" nil "~/.fehbg")
(start-process-shell-command "polybar" nil "polybar")
;; RELOAD MOUSE DRIVER
(start-process-shell-command "reload-psmouse" nil "doas modprobe -r psmouse && doas modprobe psmouse")
;; SYSTRAY VOLUME ICON
;; (start-process-shell-command "pasystray" nil "pasystray")
;; SYSTRAY NETWORK ICON
;; (start-process-shell-command "nm-applet" nil "nm-applet")
;; PULSEAUDIO
;; (start-process-shell-command "xfce4-pulseaudio-plugin" nil "xfce4-pulseaudio-plugin")
;; START UNCLUTTER, NITROGEN, REDSHIFT, SXHKD
(start-process-shell-command "unclutter" nil "unclutter") ;; HIDE CURSOR
;; (start-process-shell-command "nitrogen" nil "nitrogen --restore")
(start-process-shell-command "redshift" nil "redshift -v") ;; SOFTEN SCREEN
;; SOUND-VOLUME KEY CONTROLER
;; (start-process-shell-command "sxhkd" nil "sxhkd -c ~/.config/sxhkd/sxhkdrc") ;; SET SOUND/VOLUME FN KEYS
(start-process-shell-command "thunar" nil "thunar --daemon")
;; SET KEYBOARD OPTIONS AND X SETTINGS
(start-process-shell-command "setxkbmap" nil "setxkbmap -option ctrl:nocaps") ;; FU CAPS-LOCK
;; DISABLE Pgup PgDn
(start-process-shell-command "xmodmap" nil "xmodmap -e \"keycode 112 =\"") ;; escape quotes \
(start-process-shell-command "xmodmap" nil "xmodmap -e \"keycode 117 =\"")
;; OLD SKOOL BS REMOVAL
(start-process-shell-command "xsetroot" nil "xsetroot -cursor_name left_ptr") ;; LAPTOP TOUCHPAD
(start-process-shell-command "xset-rate" nil "xset r rate 250 65") ;; FASTER KEYBOARD :-)
(start-process-shell-command "disable-dpms" nil "xset -dpms")
(start-process-shell-command "disable-bell" nil "xset b off")
(start-process-shell-command "disable-screensaver" nil "xset s off")))
(exwm-enable)
;; Start EXWM
(add-to-list 'load-path "/usr/share/emacs/site-lisp/exwm")
(require 'exwm)
(exwm-enable))
;; Work around a bug where esup tries to step into the byte-compiled
;; version of `cl-lib', and fails horribly.
(setq esup-depth 0)
;; enable clipboard in emacs
(setq select-enable-clipboard t)
;(server-start)
;; curosr
(setq make-pointer-invisible nil)
(set-fringe-mode 15)
(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.
'(auth-source-save-behavior nil)
'(custom-safe-themes
'("10e5d4cc0f67ed5cafac0f4252093d2119ee8b8cb449e7053273453c1a1eb7cc" "3fe1ebb870cc8a28e69763dde7b08c0f6b7e71cc310ffc3394622e5df6e4f0da" "a9abd706a4183711ffcca0d6da3808ec0f59be0e8336868669dc3b10381afb6f" "37b6695bae243145fa2dfb41440c204cd22833c25cd1993b0f258905b9e65577" default))
'(elfeed-feeds
'("https://derp.foo/feeds/c/hackernews.xml?sort=New" "https://www.bbc.co.uk/news/uk-politics-66123656" "https://feeds.buzzsprout.com/1004689.rss" "https://www.youtube.com/feeds/videos.xml?channel_id=UC0A9YrHgD5hZ2JXQrxRPHsw" "https://lemmy.world/feeds/c/bmoviebonanza.xml?sort=New" "https://lemmy.world/feeds/c/privacy.xml?sort=New" "https://lemmy.world/feeds/c/technology.xml?sort=New" "https://lemmy.world/feeds/c/world.xml?sort=New" "https://lemmy.world/feeds/c/news.xml?sort=New" "https://lemmy.world/feeds/c/ukcasual.xml?sort=New" "https://lemmy.world/feeds/c/ukpolitics.xml?sort=New" "https://derp.foo/feeds/c/hackernews.xml?sort=New" "https://lemmy.world/feeds/c/enoughmuskspam.xml?sort=New" "https://lemmy.world/feeds/c/chatgpt.xml?sort=New"))
'(magit-todos-insert-after '(bottom) nil nil "Changed by setter of obsolete option `magit-todos-insert-at'")
'(package-selected-packages
'(olivetti jit-spell ef-themes flycheck-grammalecte flyspell-lazy flyspell-correct-popup ox-gemini focus mpv exec-path-from-shell dmenu powerthesaurus dashboard-hackernews bongo volume pretty-hydra curl-to-elisp elfeed-dashboard org-pdftools ox-gemini writeroom-mode titlecase html-to-markdown cpu-sos org-modern hackernews elfeed feline image-dired+ auctex-lua flycheck-clang-tidy spaces all-the-icons-nerd-fonts wwtime exwm-x battery-notifier image+ emms adaptive-wrap vterm-toggle splitter ac-ispell spell-fu yasnippet fliptext ace-window mw-thesaurus gemini-mode elpher)))
;; STRAIGHT_USE-PACKAGE
;; (straight-use-package 'org-mode :defer)
;; (straight-use-package 'gemini-mode :defer)
(straight-use-package 'vterm :defer)
(straight-use-package 'elfeed :defer)
(straight-use-package 'windresize :defer)
(straight-use-package 'flyspell :defer)
(straight-use-package 'olivetti :defer)
(straight-use-package 'pdf-tools :defer)
(straight-use-package 'elpher :defer)
(straight-use-package 'ace-window)
(straight-use-package 'yasnippet :defer)
(straight-use-package 'doom-modeline :defer)
(straight-use-package 'ispell :defer)
(straight-use-package 'flyspell-correct-popup :defer)
(straight-use-package 'spell-fu :spell-fu-global-mode :defer)
(straight-use-package 'org-modern :defer)
(straight-use-package 'mw-thesaurus :defer) ;; Thesaurus
;;(setq debug-on-error t)
(electric-indent-mode -1)
(use-package dtrt-indent
:straight t
:disabled t)
(use-package org-indent-mode
:straight t
:disabled t)
;; ZED SHELL
(setq explicit-shell-file-name "/usr/bin/zsh")
(setq shell-file-name "zsh")
(setq explicit-zsh-args '("--login" "--interactive"))
(defun zsh-shell-mode-setup ()
(setq-local comint-process-echoes t))
(add-hook 'shell-mode-hook #'zsh-shell-mode-setup)
(add-to-list 'load-path "~/.config/doom")
;; DISPLAY MODES - THEME
;; (exwm-systemtray-mode 1)
(global-emojify-mode 1)
(require 'uniquify) ;;BUFFERS
(setq uniquify-buffer-name-style 'forward)
;; Full Screen Popup
(global-set-key (kbd "") '+popup/raise) ;; DEFAULT = C-x 1.
;; performance hacks?
(setq inhibit-compacting-font-caches t)
(setq undo-limit 4000)
(setq evil-default-cursor '("DodgerBlue1" box)
evil-normal-state-cursor '("HotPink" box)
evil-emacs-state-cursor '("HotPink" box)
evil-replace-state-cursor '("HotPink" box))
(blink-cursor-mode 1)
(global-set-key (kbd "C-c bc") 'blink-cursor-mode) ;;
(after! flyspell-lazy
(flyspell-lazy-mode -1))
(after! org-mode
(flyspell-lazy-mode -1)
(spell-fu 1))
(add-hook 'dired-mode-hook 'media-thumbnail-clear-all) ;; clear all on dired start
(setq dired-listing-switches "-agho --group-directories-first"
dired-omit-files "^\\.[^.].*"
dired-omit-verbose nil
dired-hide-details-hide-symlink-targets nil
delete-by-moving-to-trash t)
;; dired styling
(use-package dired
:ensure nil ;; Dired is built into Emacs, no need to install it
:hook ((dired-mode . dired-hide-details-mode)) ;; Automatically hide details
:config
;; Check system compatibility before setting switches
(setq dired-listing-switches (if (string-match-p "gnu" system-configuration)
"-alh" ;; Use human-readable sizes for GNU `ls`
"-al")) ;; Fallback if `-h` isn't supported
;; Ensure the hook is set explicitly
(add-hook 'dired-mode-hook #'dired-hide-details-mode))
;; Colourful columns.
(use-package diredfl
:ensure t
:config
(diredfl-global-mode 1))
(map! :leader
:prefix "d"
"d" nil
:desc "dired-thumbnail-display" "t" #'media-thumbnail-dired--display)
(defun move-text-internal (arg)
(cond
((and mark-active transient-mark-mode)
(if (> (point) (mark))
(exchange-point-and-mark))
(let ((column (current-column))
(text (delete-and-extract-region (point) (mark))))
(forward-line arg)
(move-to-column column t)
(set-mark (point))
(insert text)
(exchange-point-and-mark)
(setq deactivate-mark nil)))
(t
(let ((column (current-column)))
(beginning-of-line)
(when (or (> arg 0) (not (bobp)))
(forward-line)
(when (or (< arg 0) (not (eobp)))
(transpose-lines arg)
(when (and (eval-when-compile
'(and (>= emacs-major-version 24)
(>= emacs-minor-version 3)))
(< arg 0))
(forward-line -1)))
(forward-line -1))
(move-to-column column t)))))
(defun move-text-down (arg)
"Move region (transient-mark-mode active) or current line
arg lines down."
(interactive "*p")
(move-text-internal arg))
(defun move-text-up (arg)
"Move region (transient-mark-mode active) or current line
arg lines up."
(interactive "*p")
(move-text-internal (- arg)))
(global-set-key [M-S-up] 'move-text-up)
(global-set-key [M-S-down] 'move-text-down)
(defun make-window-dedicated (arg)
"Set the current window as dedicated,
so it will not be chosen as target for other buffers.
With C-u (ARG != 1; some prefix argument)
set window as non-dedicated."
(interactive "p")
(set-window-dedicated-p nil (if (= 1 arg) t nil)))
(global-set-key (kbd "C-c mwd") 'make-window-dedicated) ;;
;; OTHER WINDOW - VSPLIT
(global-set-key (kbd "C-c oo") 'other-window) ;;
(global-set-key (kbd "C-c dw") 'evil-window-delete) ;;
;; window resize
(global-set-key (kbd "S-C-") 'shrink-window-horizontally)
(global-set-key (kbd "S-C-") 'enlarge-window-horizontally)
(global-set-key (kbd "S-C-") 'shrink-window)
(global-set-key (kbd "S-C-") 'enlarge-window)
(defun set-keyboard-layout ()
"Set the keyboard layout to UK."
(interactive)
(shell-command "setxkbmap -layout gb")) ;; Thanks Wayne!
(add-hook 'exwm-init-hook 'set-keyboard-layout)
;; (set-frame-parameter nil 'fullscreen 'fullboth) ;; frame fullscreen
(global-hide-mode-line-mode t)
(use-package eyebrowse
:diminish eyebrowse-mode
:config (progn
(define-key eyebrowse-mode-map (kbd "M-1") 'eyebrowse-switch-to-window-config-1)
(define-key eyebrowse-mode-map (kbd "M-2") 'eyebrowse-switch-to-window-config-2)
(define-key eyebrowse-mode-map (kbd "M-3") 'eyebrowse-switch-to-window-config-3)
(define-key eyebrowse-mode-map (kbd "M-4") 'eyebrowse-switch-to-window-config-4)
(define-key eyebrowse-mode-map (kbd "M-5") 'eyebrowse-switch-to-window-config-5)
(define-key eyebrowse-mode-map (kbd "M-6") 'eyebrowse-switch-to-window-config-6)
(eyebrowse-mode t)
(setq eyebrowse-new-workspace t)))
(eyebrowse-mode t)
;; mpv fn keys
(setq ns-function-modifier 'control) ;;get fn keys working
(global-set-key (kbd "") 'mpv-volume-decrease)
(global-set-key (kbd "") 'mpv-volume-increase)
(global-set-key (kbd "") 'mpv-pause)
(global-set-key (kbd "") 'mpv-play)
(global-set-key (kbd "C-c mp") 'mpv-play) ;;
(global-set-key (kbd "C-c mk") 'mpv-kill) ;;
;; VTERM OPEN
(map! :leader
:prefix "t"
"t" nil ; disable project todos key binding
:desc "+vterm-here" "t" #'+vterm/here)
;; elfeed
(add-hook 'elfeed
(lambda ()
;;(set-face-font (font-spec :family "ComicShannsMono Nerd Font" :size 18))
(spell-fu--mode-disable 1)))
(global-set-key (kbd "C-x e") 'elfeed) ;; the big web
(global-set-key (kbd "C-x u") 'elfeed-update) ;; the big web
(add-hook 'elfeed-search 'text-mode-hook 'spell-fu--immediate-disable)
(after! elfeed
(setq spell-fu-mode nil
))
;; Eww
(setq browse-url-browser-function 'eww-browse-url
shr-indentation 2
eww-search-prefix "https://lite.duckduckgo.com/lite?q=") ; Use another engine for searching
;;
(global-set-key (kbd "C-c w") 'eww) ;; THE BIG WEB
(global-set-key (kbd "C-c cpu") 'eww-copy-page-url)
(global-set-key (kbd "C-c C-b") 'eww-list-bookmarks) ;;
(global-set-key (kbd "C-c B") 'eww-add-bookmark)
(global-set-key (kbd "C-c -") 'eww-back-url)
(setq browse-url-browser-function 'eww-browse-url)
;; eww - shortcuts
(map! :leader
:prefix "e"
"e" nil
:desc "eww-toggle-images" "f" '+popup/raise) ; F12
(map! :leader
:prefix "e"
"e" nil
:desc "eww-toggle-images" "i" 'eww-toggle-images)
(map! :leader
:prefix "e"
"e" nil
:desc "eww-back-url" "h" 'eww-back-url)
(map! :leader
:prefix "e"
"e" nil
:desc "eww-forward-url" "l" 'eww-forward-url)
;; Make eww use elpher for gopher and gemini URLs
(defun emacs-init/eww-browse-url (original url &optional new-window)
"Handle gemini links."
(cond ((string-match-p "\\`\\(gemini\\|gopher\\)://" url)
(require 'elpher)
(elpher-go url))
(t (funcall original url new-window))))
;; gemini / gopher browser
(global-set-key (kbd "C-c e") 'elpher)
(global-set-key (kbd "C-c h") 'elpher-back) ;;
(require 'ox-gemini)
(org-babel-do-load-languages
'org-babel-load-languages
'((gemini . t)
(emacs-lisp . t)))
;; the entry with an org heading
(global-set-key (kbd " \n\n")
(lambda ()
(interactive)
(insert (format-time-string "\n*** %c :tag:\n#+begin_src gemini :index: :tangle index.gmi\n## %c - %s \n\n#+end_src\n"))))
(define-key global-map (kbd "C-c i") (lambda () (interactive) (insert "#DwayneElizondoMountainDewHerbertCamacho")))
(define-key global-map (kbd "C-c DC") (lambda () (interactive) (insert " #DocumentingTheCollapse")))
(define-key global-map (kbd "C-c tp") (lambda () (interactive) (insert " #The-Poppycock-Report")))
(define-key global-map (kbd "C-c s") (lambda () (interactive) (insert " #Shama Lama Ding Dong Moan!")))
(define-key global-map (kbd "") (lambda () (interactive) (insert "SLOGAN-IST IDIOT.. SHAMA LAMA DING DONG POPPYCOCK TOSS!")))
(define-key global-map (kbd "C-c j") (lambda () (interactive) (insert " #JumpDownTurnAroundAchyBreakyGenocidePickaBaleOfCotton ")))
(define-key global-map (kbd "") (lambda () (interactive) (insert "* *** Emphasis Added")))
;; add to ~/.doom.d/config.el
(after! org
(setq org-fontify-quote-and-verse-blocks nil
org-fontify-whole-heading-line nil
org-hide-leading-stars nil
org-startup-indented nil
org-startup-folded t
org-pretty-entities nil
;; global-hide-mode-line-mode t
so-long-minor-mode t
))
(setq org-indent-mode-turns-off-org-adapt-indentation 1)
;; org-babel-tangle - org-fold
(global-set-key (kbd "C-c of") 'org-fold-hide-sublevels)
(global-set-key (kbd "C-c ou") 'org-fold-show-all)
(global-set-key (kbd "C-c ot") 'org-babel-tangle) ;;
(map! :leader
:prefix "o"
:desc "org-fold" "f" 'org-fold-hide-sublevels)
(map! :leader
:prefix "o"
:desc "org-tangle" "b" 'org-babel-tangle)
(require 'org-crypt)
(org-crypt-use-before-save-magic)
(setq org-tags-exclude-from-inheritance (quote ("crypt")))
(setq org-crypt-key nil)
(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.
)
;; DON'T CREATE BACKUP FILES OR AUTOSAVE
(setq auto-save-file-name-transforms '((".*" "~/.trash/" t)))
(setq backup-directory-alist '((".*" . "~/.trash/")))
(setq make-backup-files nil)
(setq auto-save-default nil)
;; BOOKMARKS
;(map! :leader
; :prefix ("b". "buffer")
; :desc "List bookmarks" "L" #'list-bookmarks
; :desc "Set bookmark" "m" #'bookmark-set
; :desc "Delete bookmark" "M" #'bookmark-set
; :desc "Save current bookmarks to bookmark file" "w" #'bookmark-save)
(setq bookmark-default-file "~/.config/doom/bookmarks")
(global-set-key (kbd "C-c SPC") 'dmenu) ;;
(map! :leader
:prefix "d"
;; "d" nil ; disable project todos key binding
:desc "dmenu" "d" #'dmenu)
(global-set-key (kbd "C-c ") 'end-of-line)
(global-set-key (kbd "C-c ") 'beginning-of-line)
;; SPELLING DICTIONARY
(global-set-key (kbd "") 'dictcc-at-point)
(global-set-key (kbd "") 'powerthesaurus-transient)
;; Random txt operations
(global-set-key (kbd "C-c tc") 'titlecase-region) ;;
;; Spell-fu
(global-set-key (kbd "C-c Sr") 'spell-fu-reset) ;;
(global-set-key (kbd "C-c So") 'spell-fu-mode) ;;
;; like zen
(global-set-key (kbd "C-c ol") 'olivetti-mode) ;;
(map! :leader
:prefix "o"
"o" nil
:desc "olivetti mode (Zen)" "l" 'olivetti-mode)
(add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))
(setq nov-text-width 80)
(require 'elfeed-org)
;; Initialize elfeed-org
;; This hooks up elfeed-org to read the configuration when elfeed
;; is started with =M-x elfeed=
(elfeed-org)
;; Optionally specify a number of files containing elfeed
;; configuration. If not set then the location below is used.
;; Note: The customize interface is also supported.
(setq rmh-elfeed-org-files (list "~/bin/sh/elfeed.org"))
(define-advice elfeed-search--header (:around (oldfun &rest args))
(if elfeed-db
(apply oldfun args)
"No database loaded yet"))
(exwm-input-set-key (kbd "C-c g")
(lambda ()
(interactive)
(start-process-shell-command "gimp" nil "~/bin/app-img/./gimp.appimage
gimp.appimgage")))
(exwm-input-set-key (kbd "C-c bl")
(lambda ()
(interactive)
(start-process-shell-command "librewolf" nil "librewolf")))