diff --git a/flake.lock b/flake.lock index 81b810e..7dd4d92 100644 --- a/flake.lock +++ b/flake.lock @@ -750,16 +750,16 @@ "magit-file-icons": { "flake": false, "locked": { - "lastModified": 1719343259, - "narHash": "sha256-yE11UXM49emqnCBqJvf2ck4BwmHmhIhuJUPvxEBaQr8=", + "lastModified": 1719595750, + "narHash": "sha256-n/uXppejl6js/wrvEEIKmfmCh7ssbSBMMZWYrrvG1JQ=", "owner": "librephoenix", "repo": "magit-file-icons", - "rev": "d2fae0b97e7499e6b20d1af3dc6e098d4182cfdb", + "rev": "6c90eb03eb8a382110d862ec792ae50556bffd6e", "type": "github" }, "original": { "owner": "librephoenix", - "ref": "all-the-icons", + "ref": "abstract-icon-getters-compat", "repo": "magit-file-icons", "type": "github" } diff --git a/flake.nix b/flake.nix index 6a51d56..c18ddfc 100644 --- a/flake.nix +++ b/flake.nix @@ -266,7 +266,7 @@ flake = false; }; magit-file-icons = { - url = "github:librephoenix/magit-file-icons/all-the-icons"; + url = "github:librephoenix/magit-file-icons/abstract-icon-getters-compat"; flake = false; }; phscroll = { diff --git a/user/app/doom-emacs/config.el b/user/app/doom-emacs/config.el index b509fe6..8a9324b 100644 --- a/user/app/doom-emacs/config.el +++ b/user/app/doom-emacs/config.el @@ -1244,26 +1244,14 @@ If the path from LINK does not exist, nil is returned." ;;;------ magit configuration ------;;; ;; Need the following two blocks to make magit work with git bare repos -(defun ~/magit-process-environment (env) - "Add GIT_DIR and GIT_WORK_TREE to ENV when in a special directory. -https://github.com/magit/magit/issues/460 (@cpitclaudel)." - (let ((default (file-name-as-directory (expand-file-name default-directory))) - (home (expand-file-name "~/"))) - (when (string= default home) - (let ((gitdir (expand-file-name "~/.dotfiles.git/"))) - (push (format "GIT_WORK_TREE=%s" home) env) - (push (format "GIT_DIR=%s" gitdir) env)))) - env) - -(advice-add 'magit-process-environment - :filter-return #'~/magit-process-environment) - (require 'magit-todos) (setq magit-todos-keywords-list '("TODO" "FIXME" "HACK" "REVIEW" "DEPRECATED" "BUG")) (magit-todos-mode 1) (add-load-path! "~/.emacs.d/magit-file-icons") (require 'magit-file-icons) +(setq magit-file-icons-icon-for-file-func 'all-the-icons-icon-for-file) +(setq magit-file-icons-icon-for-dir-func 'all-the-icons-icon-for-dir) (magit-file-icons-mode 1) (require 'all-the-icons-ibuffer) diff --git a/user/app/doom-emacs/doom.org b/user/app/doom-emacs/doom.org index 433b090..d97ba1f 100644 --- a/user/app/doom-emacs/doom.org +++ b/user/app/doom-emacs/doom.org @@ -1459,26 +1459,14 @@ On Wayland, EAF doesn't work. #+BEGIN_SRC emacs-lisp :tangle config.el ;;;------ magit configuration ------;;; ;; Need the following two blocks to make magit work with git bare repos -(defun ~/magit-process-environment (env) - "Add GIT_DIR and GIT_WORK_TREE to ENV when in a special directory. -https://github.com/magit/magit/issues/460 (@cpitclaudel)." - (let ((default (file-name-as-directory (expand-file-name default-directory))) - (home (expand-file-name "~/"))) - (when (string= default home) - (let ((gitdir (expand-file-name "~/.dotfiles.git/"))) - (push (format "GIT_WORK_TREE=%s" home) env) - (push (format "GIT_DIR=%s" gitdir) env)))) - env) - -(advice-add 'magit-process-environment - :filter-return #'~/magit-process-environment) - (require 'magit-todos) (setq magit-todos-keywords-list '("TODO" "FIXME" "HACK" "REVIEW" "DEPRECATED" "BUG")) (magit-todos-mode 1) (add-load-path! "~/.emacs.d/magit-file-icons") (require 'magit-file-icons) +(setq magit-file-icons-icon-for-file-func 'all-the-icons-icon-for-file) +(setq magit-file-icons-icon-for-dir-func 'all-the-icons-icon-for-dir) (magit-file-icons-mode 1) #+END_SRC