Skip to content

Commit

Permalink
Display ⌘ for tab hints
Browse files Browse the repository at this point in the history
  • Loading branch information
pkryger committed Jan 17, 2025
1 parent 067f3e3 commit 89eabfd
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions after-init.el
Original file line number Diff line number Diff line change
Expand Up @@ -1408,12 +1408,23 @@ language."
(defun pk/tab-bar--tab-name-format (tab i)
; checkdoc-params: (i)
"Add extra horizontal padding for TAB."
(concat
(propertize " " 'display '((space :width 8))
'face (funcall tab-bar-tab-face-function tab))
(tab-bar-tab-name-format-default tab i)
(propertize " " 'display '((space :width 8))
'face (funcall tab-bar-tab-face-function tab))))
(let ((face (funcall tab-bar-tab-face-function tab))
(mac-hint (and (eq tab-bar-tab-hints 'mac)
(< i 9))))
(concat
(propertize " " 'display '((space :width 8))
'face face)
(let ((tab-bar-tab-hints (unless (eq tab-bar-tab-hints 'mac)
tab-bar-tab-hints)))
(tab-bar-tab-name-format-default tab i))
(propertize " " 'display `((space :width ,(- 8 (if mac-hint 2 0))))
'face (funcall tab-bar-tab-face-function tab))
(when mac-hint
(concat
(propertize (format "%d " i)
'face face)
(propertize " " 'display '((space :width 2))
'face face))))))

:custom
(tab-bar-separator (propertize "|"
Expand All @@ -1423,7 +1434,7 @@ language."
(tab-bar-format '(tab-bar-format-tabs
(lambda () " ")))
(tab-bar-auto-width nil)
(tab-bar-tab-hints t)
(tab-bar-tab-hints (when exordium-osx 'mac))
(tab-bar-close-button-show nil)
(tab-bar-new-button-show nil)
(tab-bar-new-tab-choice 'clone)
Expand Down

0 comments on commit 89eabfd

Please sign in to comment.