https://github.com/jimeh/tab-bar-notch
Adjust tab-bar height for MacBook Pro notch
https://github.com/jimeh/tab-bar-notch
camera-notch emacs macbook-pro macos notch tab-bar
Last synced: about 2 months ago
JSON representation
Adjust tab-bar height for MacBook Pro notch
- Host: GitHub
- URL: https://github.com/jimeh/tab-bar-notch
- Owner: jimeh
- License: mit
- Created: 2023-11-16T14:37:16.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-24T01:09:14.000Z (5 months ago)
- Last Synced: 2025-03-24T06:06:46.844Z (about 2 months ago)
- Topics: camera-notch, emacs, macbook-pro, macos, notch, tab-bar
- Language: Emacs Lisp
- Homepage:
- Size: 36.1 KB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
tab-bar-notch
Adjust tab-bar height for MacBook Pro notch.
When using the non-native fullscreen mode of Emacs on modern MacBook Pro
machines, it ends up rendering buffer content behind the camera notch. This
package attempts to solve this by way of resizing the tab-bar to fill the
vertical space taken up by the camera notch.Obviously `tab-bar-mode` must be enabled with the tab-bar visible at the top of
the frame for this package to be able to function.## Non-Native Fullscreen?
The default native fullscreen implementation on macOS can be rather annoying, as
it moves applications over to their own separate desktop Space. This prevents
you from layering windows from other applications on top it, among other things.Emacs supports both native and non-native fullscreen modes. In the non-native
mode, Emacs just acts like any other window, but stretches itself to cover the
whole screen, and hides the menu bar and dock. Non-native fullscreen is enabled
with:```elisp
(setq ns-use-native-fullscreen nil)
```In the non-native fullscreen mode, Emacs is not aware of the physical camera
notch however, so it does not know to avoid rendering things behind it.## Installation
`tab-bar-notch` is available via [MELPA](https://melpa.org/).
### use-package
```elisp
(use-package tab-bar-notch)
```### Manual
Place `tab-bar-notch.el` somewhere in your `load-path` and require it. For
example `~/.emacs.d/vendor`:```elisp
(add-to-list 'load-path "~/.emacs.d/vendor")
(require 'tab-bar-notch)
```## Usage
You must be using `tab-bar-mode`, with the tab-bar visible at the top of the
frame above all buffers.Then simply add `tab-bar-notch-spacer` to the `tab-bar-format` variable, for
example:```elisp
(setq tab-bar-format '(tab-bar-format-history
tab-bar-format-tabs
tab-bar-separator
tab-bar-format-add-tab
tab-bar-notch-spacer))
```To disable the package, simply remove `tab-bar-notch-spacer`, and it will
unregister itself from window resizing hooks.