diff --git a/init.el b/init.el index 6bec16f..afb7e4d 100644 --- a/init.el +++ b/init.el @@ -25,13 +25,6 @@ (defvar use-short-answers t) (defalias 'yes-or-no-p 'y-or-n-p)) -;; do the things -(add-hook 'server-after-make-frame-hook #'mir/graphical-setup) -(if (display-graphic-p) - ;; (add-hook 'elpaca-after-init-hook #'mir/graphical-setup) - (add-hook 'after-init-hook #'mir/graphical-setup) - ) - ;; Control backups/swapfiles (defvar backup-directory (expand-file-name "emacs-backups" @@ -298,9 +291,10 @@ If the current window occupies the whole frame, split it." (elpaca elpaca-use-package (elpaca-use-package-mode) (setq elpaca-use-package-by-default t)) - (elpaca-process-queues) + (elpaca-wait) (require 'dash) - (setq use-package-git-keyword :elpaca)) + ;; (setq use-package-git-keyword :ensure) + ) (defun nix-bootstrap () "placeholder function. Ideally, load nix packages" @@ -315,23 +309,33 @@ If the current window occupies the whole frame, split it." (let ((index (cl-position key plist))) (-remove-at-indices `(,index ,(1+ index)) plist)) plist)) -;; (plist-remove :straight '(use-package package)) +;; (plist-remove :ensure '(use-package package)) ;; (if (executable-find "home-manager") ;; ;; (nix-bootstrap) ;; (straight-bootstrap) ;; (if (eq system-type 'windows-nt) ;; (straight-bootstrap) ;; (elpaca-bootstrap))) -(straight-bootstrap) +;; (straight-bootstrap) +(elpaca-bootstrap) + +;; (fset #'use-package--orig (symbol-function #'use-package)) +;; (defmacro use-package (&rest args) +;; "re-definition of use-package to replace the downloader depending on system" +;; ;; (require 'dash) +;; (if (eq use-package-git-keyword :nix) +;; `(use-package--orig ,@(plist-remove :ensure args)) +;; `(use-package--orig ,@(-replace :ensure use-package-git-keyword args)))) +;; (use-package lua-mode :ensure nil) + +(setq init-hook 'elpaca-after-init-hook) +;; do the things +(add-hook 'server-after-make-frame-hook #'mir/graphical-setup) +(if (display-graphic-p) + (add-hook 'init-hook #'mir/graphical-setup) + ;; (add-hook 'after-init-hook #'mir/graphical-setup) + ) -(fset #'use-package--orig (symbol-function #'use-package)) -(defmacro use-package (&rest args) - "re-definition of use-package to replace the downloader depending on system" - ;; (require 'dash) - (if (eq use-package-git-keyword :nix) - `(use-package--orig ,@(plist-remove :git args)) - `(use-package--orig ,@(-replace :git use-package-git-keyword args)))) -;; (use-package lua-mode :git nil) (use-package compat) (use-package marginalia :init (marginalia-mode)) @@ -345,7 +349,7 @@ If the current window occupies the whole frame, split it." :mode ("\\.ps1\\'" . powershell-mode)) ;; (message "%s" elpaca--queues) -(if (fboundp #'elpaca) (elpaca-process-queues)) +(if (fboundp #'elpaca) (elpaca-wait)) ;; diminish (use-package diminish @@ -356,7 +360,8 @@ If the current window occupies the whole frame, split it." :demand t :custom (default-input-method "japanese") :config (require 'mir-keybinds)) -(if (fboundp #'elpaca) (elpaca-wait)) +;;(if (fboundp #'elpaca) (elpaca-wait)) +(elpaca-wait) (use-package eldoc-box :after eldoc :diminish (eldoc-mode eldoc-box-hover-at-point-mode) @@ -401,7 +406,7 @@ If the current window occupies the whole frame, split it." (use-package altcaps :after evil - :git (:host github + :ensure (:host github :repo "protesilaos/altcaps") :general (general-define-key :states 'visual @@ -429,7 +434,7 @@ If the current window occupies the whole frame, split it." ;; show command that caused last scrollback in eshell etc (use-package sticky-shell - :git (sticky-shell + :ensure (sticky-shell :host github :repo "andyjda/sticky-shell") :after eshell @@ -456,7 +461,7 @@ If the current window occupies the whole frame, split it." :hook (eshell-mode . exec-path-from-shell-initialize)) (use-package eat - :git (eat :type git + :ensure (eat :type git :repo "https://codeberg.org/akib/emacs-eat" :files ("*.el" ("term" "term/*.el") "*.texi" "*.ti" ("terminfo/e" "terminfo/e/*") @@ -482,32 +487,32 @@ If the current window occupies the whole frame, split it." :custom (eshell-syntax-highlighting-in-remote-dirs t)) (use-package eshell-dat - :git (eshell-dat + :ensure (eshell-dat :repo "https://git.marq42.xyz/mir/eshell-dat") :after eshell) (use-package ansilove - :git (:host gitlab + :ensure (:host gitlab :repo "xgqt/emacs-ansilove") :commands ansilove) (use-package p11k - :git (:repo "https://git.marq42.xyz/mir/p11k") + :ensure (:repo "https://git.marq42.xyz/mir/p11k") :after eshell :hook (eshell-first-time-mode . p11k-mode)) ;; File manager. Only breaks when you brag about how it doesn't. (use-package all-the-icons - :git (all-the-icons + :ensure (all-the-icons ;; :post-build ;; ("emacsclient" "--eval '(all-the-icons-install-fonts t)'") )) (use-package nerd-fonts - :git (:host github + :ensure (:host github :repo "twlz0ne/nerd-fonts.el")) ;; (use-package nerd-icons ;has error -;; :git (:host github :repo "rainstormstudio/nerd-icons.el") +;; :ensure (:host github :repo "rainstormstudio/nerd-icons.el") ;; :custom (nerd-icons-font-family "MesloLGS NF")) (use-package dirvish - :git (:files (:defaults "extensions/*.el")) + :ensure (:files (:defaults "extensions/*.el")) :defer 0.5 :commands dirvish :custom @@ -535,7 +540,7 @@ If the current window occupies the whole frame, split it." ;; Completion framework... (use-package vertico - :git (:files (:defaults "extensions/*.el")) + :ensure (:files (:defaults "extensions/*.el")) :custom (vertico-resize t) :init (vertico-mode t) :config @@ -557,12 +562,12 @@ see https://www.reddit.com/r/emacs/comments/xq6rpa/comment/iqynyu9/?utm_source= :prefix-map 'minibuffer-mode-map "DEL" 'backspace-in-minibuffer)) (use-package vertico-mouse - :git nil + :ensure nil :after vertico :config (vertico-mouse-mode)) (use-package app-launcher - :git (app-launcher + :ensure (app-launcher :host github :repo "SebastienWae/app-launcher") :commands (app-launcher-run-app emacs-run-launcher) :config @@ -721,7 +726,7 @@ targets." ;; Custom Theme. ;; Not to be confused with a color theme, or a color scheme, or a custom scheme. (use-package sv-theme - :git (sv-theme + :ensure (sv-theme :repo "https://git.marq42.xyz/mir/sv-theme") :config @@ -732,7 +737,7 @@ targets." ;; parentheses settingses (use-package paredit - ;; :git nil + ;; :ensure nil ;; elpaca declaration is broken, I just cloned it manually to .config/emacs/elpaca/repos ;; see my issue https://github.com/progfolio/elpaca/issues/40 :diminish @@ -757,7 +762,7 @@ targets." ;; org mode and messy things (use-package org - :git nil + :ensure nil :diminish (org-indent-mode org-vw-mode) :custom ;; (org-hide-leading-stars t) @@ -915,7 +920,7 @@ Return nil if DIR is not in a hugo project at all." (use-package relint :commands relint-file) (use-package elisp-autofmt - :git (elisp-autofmt + :ensure (elisp-autofmt :url "https://codeberg.org/ideasman42/emacs-elisp-autofmt" :files ("*")) :custom (elisp-autofmt-python-bin "/usr/bin/python3")) @@ -957,7 +962,7 @@ Return nil if DIR is not in a hugo project at all." ;; epic drop-down completion (use-package corfu :after eldoc - :git (:files (:defaults "extensions/*.el")) + :ensure (:files (:defaults "extensions/*.el")) ;; :if (display-graphic-p) ; breaks in emacsclient :custom ;; (corfu-cycle t) ;; Enable cycling for `corfu-next/previous' @@ -1005,11 +1010,11 @@ Return nil if DIR is not in a hugo project at all." :after eshell) (use-package popon - :git (:type git + :ensure (:type git :repo "https://codeberg.org/akib/emacs-popon") :if (not (display-graphic-p))) (use-package corfu-terminal - :git (corfu-terminal + :ensure (corfu-terminal :type git :repo "https://codeberg.org/akib/emacs-corfu-terminal") :after popon @@ -1059,7 +1064,7 @@ Return nil if DIR is not in a hugo project at all." ;; :after magit ;; :init (magit-todos-mode)) (use-package blamer - :git (:host github :repo "artawower/blamer.el") + :ensure (:host github :repo "artawower/blamer.el") :after magit :custom (blamer-view 'overlay) @@ -1073,16 +1078,16 @@ Return nil if DIR is not in a hugo project at all." :italic t))) :commands blamer-show-posframe-commit-info) (use-package magit-stats - :git (:host github :repo "LionyxML/magit-stats") + :ensure (:host github :repo "LionyxML/magit-stats") :after magit :commands magit-stats) (use-package magit-pretty-graph - :git (:host github :repo "georgek/magit-pretty-graph") + :ensure (:host github :repo "georgek/magit-pretty-graph") :after magit :commands magit-pg-repo) (use-package hyperbole - :git (:files ("*.el" + :ensure (:files ("*.el" ("kotl" "kotl/*.el") "man/*.info" "man/*.texi") :host github :repo "rswgnu/hyperbole") @@ -1092,12 +1097,12 @@ Return nil if DIR is not in a hugo project at all." "RET" 'hkey-either)) (use-package dconf-mode - :git (dconf-mode + :ensure (dconf-mode :type git :repo "https://git.marq42.xyz/mir/dconf-mode")) (use-package info-variable-pitch - :git (info-variable-pitch + :ensure (info-variable-pitch :host github :repo "kisaragi-hiu/info-variable-pitch") :config @@ -1110,13 +1115,13 @@ Return nil if DIR is not in a hugo project at all." :config (load (expand-file-name "~/quicklisp/slime-helper.el"))) (use-package dwim-shell-command - :git (dwim-shell-command + :ensure (dwim-shell-command :files (:defaults "dwim-shell-commands.el")) :config (require 'dwim-shell-commands) :commands dwim-shell-commands-kill-process) (use-package youtube-sub-extractor - :git (youtube-sub-extractor + :ensure (youtube-sub-extractor :host github :repo "agzam/youtube-sub-extractor.el") :custom (youtube-sub-extractor-timestamps 'left-margin) @@ -1124,11 +1129,11 @@ Return nil if DIR is not in a hugo project at all." ;; Cheat sheet (use-package cheat-sh - :git (cheat-sh :host github :repo "davep/cheat-sh.el") + :ensure (cheat-sh :host github :repo "davep/cheat-sh.el") :commands cheat-sh) (use-package pcre2el - :git (:host github + :ensure (:host github :repo "joddie/pcre2el") :config (defmacro prx (&rest expressions) @@ -1161,7 +1166,7 @@ Taken from https://howardism.org/Technical/Emacs/eshell-why.html" :mode "\\.yuck") (use-package fretboard - :git (:host github :repo "vifon/fretboard.el") + :ensure (:host github :repo "vifon/fretboard.el") :commands fretboard) (use-package power-mode @@ -1170,7 +1175,7 @@ Taken from https://howardism.org/Technical/Emacs/eshell-why.html" (power-mode-streak-shake-threshold nil)) (use-package notibox :if (display-graphic-p) - :git (:host github :repo "MitchMarq42/notibox.el") + :ensure (:host github :repo "MitchMarq42/notibox.el") :demand t :custom (notibox-corner 'topright) :config (notibox/setup-timer)) @@ -1179,33 +1184,33 @@ Taken from https://howardism.org/Technical/Emacs/eshell-why.html" (use-package vidframe :if (display-graphic-p) ;we won't yet bother with ;kitty/sixel/catimg shit - :git (:host github :repo "MitchMarq42/vidframe.el") + :ensure (:host github :repo "MitchMarq42/vidframe.el") :defer t) ;; Kitty Keyboard Protocol (use-package kkp - :git (:host github :repo "benjaminor/kkp") + :ensure (:host github :repo "benjaminor/kkp") :unless (display-graphic-p) :config (global-kkp-mode)) ;; Rubix Cube (use-package eagle - :git (:repo "https://codeberg.org/akib/emacs-eagle")) + :ensure (:repo "https://codeberg.org/akib/emacs-eagle")) (use-package cube - :git (:repo "https://codeberg.org/akib/emacs-cube") + :ensure (:repo "https://codeberg.org/akib/emacs-cube") :commands 'cube) (use-package dtache - :git (:repo "https://gitlab.com/niklaseklund/dtache") + :ensure (:repo "https://gitlab.com/niklaseklund/dtache") :hook (after-init . dtache-setup)) (use-package org-modern-indent - :git (:type git :host github :repo "jdtsmith/org-modern-indent") + :ensure (:type git :host github :repo "jdtsmith/org-modern-indent") :hook (org-mode . org-modern-indent-mode)) (use-package indent-bars - :git (:type git :host github :repo "jdtsmith/indent-bars") + :ensure (:type git :host github :repo "jdtsmith/indent-bars") :custom (indent-bars-prefer-character t) (indent-bars-color '(highlight :face-bg t :blend 0.75))