- JavaScript 56.5%
- Python 24.3%
- Luau 18.8%
- Makefile 0.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| bin | ||
| companion | ||
| docs | ||
| examples | ||
| lib/nightingale | ||
| tests | ||
| translations | ||
| vendor | ||
| .gitignore | ||
| CHANGELOG.md | ||
| LICENSE | ||
| Makefile | ||
| package-lock.json | ||
| package.json | ||
| plugin.toml | ||
| README.md | ||
| service.luau | ||
| shortcut.luau | ||
| terminal.luau | ||
| widget.luau | ||
Nightingale
Nightingale is a Noctalia-native drop-down terminal. The terminal is a real Noctalia layer-shell surface, not a normal application window and not a kitty quick-access panel.
It uses libghostty via @wterm/ghostty for terminal emulation, node-pty for the shell, and @napi-rs/canvas to render the terminal grid. Noctalia owns placement, visibility, keyboard focus, animation, decoration, and theme integration.
There is no compositor-specific window controller, hidden workspace, floating rule, or scratchpad. Niri is not moved, queried, resized, or otherwise manipulated.
Features
- Independent width and height percentages, nine anchors, configurable gaps, and Noctalia bar-aware layout.
- Persistent terminal session while the layer is hidden.
- Noctalia-native reveal animation without renegotiating the PTY every animation frame.
- Live canvas/PTY resizing when layer dimensions change.
- Current Noctalia palette roles for terminal foreground, background, cursor, selection, border, and ANSI colors.
- Terminal font-family and size settings, with optional tracking of Noctalia's global shell font.
- Scaled rendering for HiDPI outputs.
- Scrollback, cursor shapes/blink, bracketed paste, application cursor keys, SGR mouse reporting, Shift+drag text selection, and clipboard copy/paste.
- Native kitty keyboard negotiation and xterm modifyOtherKeys support for unambiguous modified keys and Escape handling.
- Direct Kitty PNG/RGB/RGBA image placements rendered into the shared terminal canvas.
- Bar widget, control-center tile, Noctalia settings, and plugin IPC controls.
- Vendored runtime modules: users do not need to run
npm install.
Requirements
- Noctalia with plugin API 52 or newer (layer surfaces, pixel streams, and composited declarative transforms).
- Python 3 on Linux.
- Node.js. The included native artifact was built/tested with Node 22 on Linux x86-64/glibc.
- A Wayland compositor supported by Noctalia's layer surfaces.
node-pty contains a Node-ABI-specific native module and canvas contains a platform-specific Skia binary. See vendor/README.md before packaging for another OS, architecture, libc, or Node ABI.
Installation
Install the complete plugin directory, including vendor/, at:
~/.local/share/noctalia/plugins/nightingale/
Enable asriel/nightingale through Noctalia's plugin manager. Add the Nightingale bar widget (asriel/nightingale:toggle) or control-center tile (asriel/nightingale:toggle-tile).
For development, a symlink to the checkout is sufficient. When editing an active layer, hide and show it once to force a fresh runtime if the file watcher does not notice a symlinked-path edit.
Keybindings
Nightingale needs no compositor window rules. A keybinding only sends ordinary Noctalia plugin IPC. For Niri, merge examples/keybind.kdl into your existing binds {} block:
- Mod+D — toggle
- Mod+Shift+D — hide
- Mod+Alt+D — restart the terminal session
The same noctalia msg plugin commands work from any compositor's keybinding facility.
Settings
| Setting | Default | Meaning |
|---|---|---|
width_percent |
50 | Terminal width as a percentage of usable output width |
height_percent |
40 | Terminal height as a percentage of usable output height |
anchor |
top |
Top/bottom/left/right, corners, or center |
gap |
12 | Minimum logical-pixel edge gap |
bar_aware |
true | Subtract Noctalia's reserved bar areas |
font_family |
monospace |
Terminal renderer family, with Fontconfig fallback |
follow_shell_font |
false | Use Noctalia's global shell.font_family instead |
font_size |
16 | Logical font size before output scaling |
cursor_blink |
true | Blink the focused terminal cursor |
scrollback |
5000 | Retained terminal rows; applies on daemon restart |
shell_command |
empty | Command instead of the user's login shell |
term_type |
xterm-kitty |
TERM/terminfo identity exposed to the shell; applies on restart |
background_opacity |
0.9 | Noctalia background opacity without fading terminal text |
border_enabled |
true | Draw the Noctalia border |
border_accent |
primary |
Palette role used by the border |
border_width |
2 | Border thickness in logical pixels |
corner_radius |
12 | Rounded layer radius and clipping |
content_padding |
6 | Clearance between the rounded edge and terminal pixels |
osc52_clipboard |
true | Allow terminal applications to copy through OSC 52 |
reveal_animation |
true | Composited translation/opacity reveal |
reveal_ms |
200 | Reveal duration; no PTY resize occurs per frame |
Theme changes redraw the existing terminal buffer without restarting the shell. Font and output-scale changes remeasure the cell grid and renegotiate canvas/PTY dimensions.
Controls
Noctalia plugin IPC:
noctalia msg plugin asriel/nightingale:service all toggle [output]
noctalia msg plugin asriel/nightingale:service all show [output]
noctalia msg plugin asriel/nightingale:service all hide
noctalia msg plugin asriel/nightingale:service all restart
noctalia msg plugin asriel/nightingale:service all close
Inside the terminal:
- Ctrl+Shift+C copies the current selection.
- Ctrl+Shift+V pastes Noctalia's clipboard, honoring bracketed-paste mode.
- Wheel scrolling uses terminal scrollback, or SGR mouse wheel events when an application requests mouse tracking.
- Pointer drag selects text. Application mouse mode preserves ordinary clicks, while moving to another cell turns the gesture into host selection. Shift+drag forces selection immediately.
The standalone helper manages the companion process and forwards legacy visibility commands through Noctalia IPC:
nightingale daemon
nightingale status
nightingale stop
nightingale toggle|show|hide|restart|close [--output CONNECTOR]
status prints JSON with daemon/shell state, PTY dimensions, and last renderer timing. Visibility belongs to Noctalia; the forwarding commands exist for compatibility with earlier keybindings and cached widget runtimes.
Runtime files
Under ${XDG_RUNTIME_DIR}/nightingale/:
settings.json: latest theme/font/session settings published by Noctalia;pixels.sock: Noctalia's shared-memory pixel-stream endpoint;input.d/: regular-file JSON input messages consumed after close-write via inotify;state.json/broker.json: process and current terminal state;broker.lock: prevents duplicate daemons;companion.log: companion errors only, not shell output.
The daemon prewarms a shell and renders only when content/state changes. Hiding destroys the layer but leaves the daemon, Ghostty terminal state, PTY, and shell alive.
Development
npm install
make check
make integration
make check runs Node unit tests and syntax checks, Python compilation, Noctalia plugin lint, and JSON validation. make integration runs a real PTY + sealed-memfd + pixel-protocol + regular-file control-queue smoke test and cleans up its daemon afterward.
See docs/ARCHITECTURE.md for protocol and lifecycle details.
Current limitations
- The renderer supports direct Kitty PNG/RGB/RGBA placements. Animation, Sixel, iTerm2/OSC 1337, virtual Unicode placements, and file/shared-memory/URL media are not currently exposed.
- Unicode/emoji rendering relies on canvas and Fontconfig fallback; validating every script and font combination remains ongoing work.
- Kitty keyboard handling covers disambiguated Escape, common modified keys, and requested release events on those paths. Full alternate-key and associated-text reporting remain future work.
- Bar reserves currently use Noctalia's maximum configured reserve per edge across outputs rather than per-output overrides.
- The included native vendor artifact targets the platform documented above; other targets need their own packaged artifacts.
- Noctalia layer runtimes are recreated on hide. The terminal session persists, but layer-local pointer state is intentionally transient.
- Initial input focus: a compositor may focus the layer before Noctalia focuses its internal pixel-stream control. Click inside the terminal once if it is visible but not accepting text. Noctalia currently exposes programmatic
focus = trueforui.input, but notui.pixelStream; fixing this properly requires core support, not an input-injection shim.
License
Nightingale is MIT; see LICENSE. Vendored packages retain their own licenses and notices under vendor/node_modules/.