Skip to content

Latest commit

 

History

History
31 lines (26 loc) · 1.57 KB

File metadata and controls

31 lines (26 loc) · 1.57 KB

Virtual Touch Bar — custom GNOME Shell extension

A fixed strip on the bottom edge of the screen replaces the dead Touch Bar: Esc | F1–F12 | Canc, full width, always there from the GDM login screen to shutdown (lock screen included).

Design

  • Every key shows its label, the equivalent physical combo in small grey text, and — for F7–F12 — the media action in small amber with an icon (🔅🔆🔇🔉🔊 / PRINT).
  • Clicks inject keys at the compositor level (Clutter.VirtualInputDevice): they work in every app, native Wayland included.
  • The strip reserves its space via affectsStruts: windows never end up under it.
  • Height is computed from content (get_preferred_height) — labels can never be clipped by display scaling (a bug the first version actually had; found by screenshotting the strip and zooming in).

Files

  • Source: gnome-extension/touchbar@hubpsk.local/
  • Installed to /usr/share/gnome-shell/extensions/ (system-wide is what makes the GDM login screen show it) + a dconf entry for the gdm user.
  • session-modes: ["gdm", "unlock-dialog", "user"] is what keeps it alive outside the normal session.

Workflow

Edit source → validate (gjs + Reflect.parse) → sudo scripts/06-onscreen-touchbar.shlog out and back in (Wayland cannot hot-reload extension code).

Known cohabitation note

With the Ubuntu dock at the bottom, dock icons overlap the first keys. Either move the dock (gsettings set org.gnome.shell.extensions.dash-to-dock dock-position 'LEFT') or enable auto-hide.