https://github.com/rocktakey/tab-bar-display
Display strings on tab-bar in Emacs.
https://github.com/rocktakey/tab-bar-display
Last synced: 2 months ago
JSON representation
Display strings on tab-bar in Emacs.
- Host: GitHub
- URL: https://github.com/rocktakey/tab-bar-display
- Owner: ROCKTAKEY
- License: gpl-3.0
- Created: 2020-08-21T07:17:06.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-01T17:10:22.000Z (over 4 years ago)
- Last Synced: 2025-03-20T16:39:41.878Z (2 months ago)
- Language: Emacs Lisp
- Size: 27.3 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[[https://github.com/ROCKTAKEY/tab-bar-display][https://img.shields.io/github/tag/ROCKTAKEY/tab-bar-display.svg?style=flat-square]]
[[file:LICENSE][https://img.shields.io/github/license/ROCKTAKEY/tab-bar-display.svg?style=flat-square]]
[[https://github.com/ROCKTAKEY/tab-bar-display/actions][https://img.shields.io/github/workflow/status/ROCKTAKEY/tab-bar-display/CI/master.svg?style=flat-square]]
* Display strings on tab-bar in Emacs.* How to Use?
Turn on ~tab-bar-mode~ and ~tab-bar-display-mode~.
Then, you can see ~tab-bar-display-before~ formatted ~format-mode-line~
before tabs, and ~tab-bar-display-after~ after tabs.* Example
#+begin_src emacs-lisp :tangle yes
(defface my-tab-bar-path
'((t (:background "#000000" :foreground "#00ff00")))
"My face for path on tab-bar.")(defface my-tab-bar-time
'((t (:background "#000000" :foreground "#ff0000")))
"My face for path on tab-bar.")(setq tab-bar-display-before
'((:eval
(propertize
(format-time-string " %Y/%m/%d %T ")
'face 'my-tab-bar-time))
" "
(:eval
(if-let ((str (buffer-file-name (current-buffer))))
(propertize
(concat " " str " ")
'face 'my-tab-bar-path)
""))))
#+end_src
The code above expresses:
[[https://raw.githubusercontent.com/ROCKTAKEY/images/tab-bar-display/demo1.png]]** Note
The "%T" in ~format-time-string~ means HH:MM:SS. However, interval of ~tab-bar~
update is longer than 1 second, so the second displayed in tab-bar stop.
If you want see real time, write like this:
#+begin_src emacs-lisp :tangle yes
(run-with-timer 1 1 #'force-mode-line-update)
#+end_src
It might delay emacs.
* License
This package is licensed by GPLv3. See [[file:LICENSE][LICENSE]].