diff options
| author | Blake Romero <blake@developercraft.com> | 2025-10-18 22:04:00 +0100 |
|---|---|---|
| committer | Blake Romero <blake@developercraft.com> | 2025-10-18 22:04:00 +0100 |
| commit | e9f1866c8593ce94553e9e2edcf7d9502b10b377 (patch) | |
| tree | ae9ab654a5767a4e26cf7eead6c865f27d7d24f1 | |
| parent | 47e9c8c9eb03628c3358bc695a6de0713a5d8d6a (diff) | |
Add nerd icon to git branch
| -rw-r--r-- | modally.el | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -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." |
