From e9f1866c8593ce94553e9e2edcf7d9502b10b377 Mon Sep 17 00:00:00 2001 From: Blake Romero Date: Sat, 18 Oct 2025 22:04:00 +0100 Subject: Add nerd icon to git branch --- modally.el | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'modally.el') diff --git a/modally.el b/modally.el index 4d17769..41fdf88 100644 --- a/modally.el +++ b/modally.el @@ -106,13 +106,15 @@ (defun modally--git-branch () "Return a propertized Git branch string." (when-let* ((buffer (buffer-file-name)) - (branch (vc-git--symbolic-ref buffer))) + (branch (vc-git--symbolic-ref buffer)) + (face (if (mode-line-window-selected-p) + 'modally-git-branch + 'mode-line-inactive)) + (icon (nerd-icons-devicon "nf-dev-git_branch")) + (branch (format "%s %s" icon branch))) (format " %s %s" - (propertize branch 'face (if (not (mode-line-window-selected-p)) - 'mode-line-inactive - 'modally-git-branch)) - (modally--separator) - ))) + (propertize branch 'face face) + (modally--separator)))) (defun modally--flymake-diagnostics () "Return `flymake-mode' alert counts." -- cgit