Skip to content
Projects

About

A desktop for your terminal: floating windows, a taskbar with a Start menu, themes and wallpapers, over SSH or locally, on Linux and macOS.

Developer Tools

How these counts are measured

What you can do

  • Windows: move, resize, minimize, maximize, cascade. They stay on screen and scale with the terminal, so the same desktop fits a laptop and a big monitor.
  • Start menu with search over apps and every program on your PATH; Tab completes, Enter runs, and a command with arguments runs as typed.
  • Pin anything to the Start menu or the desktop: right-click it, or Ctrl+S / Ctrl+D.
  • Desktop shortcuts, right-click menus, tooltips.

Measured star growth

in 24h
Collecting history
in 7 days
Collecting history
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.md

Original

tui-desk

A desktop for your terminal. Floating windows, a taskbar with a Start menu, themes and wallpapers, in any modern terminal (it works best in Ghostty): reach it over SSH or run it locally, on Linux and macOS. Your apps keep running when you disconnect; log in again and they are where you left them.

tui-desk demo: search the Start menu, open apps, arrange windows, change the theme and wallpaper

The program is called desk. It is one binary (static on Linux) that runs ordinary terminal apps, each in its own window.

Start menu search Personalize: themes, wallpapers, icons
Start menu: search apps and every program on your PATH, with Tab completion. Personalize: eleven standard themes, four wallpapers, Nerd Font or plain icons.
Desktop shortcuts and menus Themes
Desktop shortcuts, right-click menus and the status area. A theme colours the desktop and the apps in its windows.

Features

  • Windows: move, resize, minimize, maximize, cascade. They stay on screen and scale with the terminal, so the same desktop fits a laptop and a big monitor.
  • Start menu with search over apps and every program on your PATH; Tab completes, Enter runs, and a command with arguments runs as typed.
  • Pin anything to the Start menu or the desktop: right-click it, or Ctrl+S / Ctrl+D.
  • Desktop shortcuts, right-click menus, tooltips.
  • Status area: CPU with a small graph, network link, clock; each opens a panel.
  • Settings: Appearance everywhere; network and date & time on Linux (with an automatic undo for network changes, so a mistake cannot cut you off).
  • Themes: Catppuccin Mocha and Latte, Tokyo Night, Gruvbox Dark, Nord, Dracula, Rosé Pine, Everforest, Kanagawa, Solarized Dark and One Dark. They also recolour the apps in windows, as a terminal colour scheme would.
  • Wallpapers painted in the theme's colours: Aurora, Waves, Gradient, Solid.
  • Scrollback: the mouse wheel and Shift+Page Up scroll a terminal window's history.
  • Persistent: the desktop and its apps outlive the SSH connection.

Install

One command, on macOS, Debian, Ubuntu and Alpine:

curl -fsSL https://github.com/gak4u/tui-desk/releases/latest/download/install.sh | sh

(Alpine has no curl at first: wget -qO- https://github.com/gak4u/tui-desk/releases/latest/download/install.sh | sh.)

It installs desk and the apps its Start menu opens, using Homebrew, apt or apk. On Linux it also sets up a desk account whose SSH login opens the desktop, and asks for your password (sudo or doas) for those steps. Then run desk in your terminal, or ssh desk@that-machine from another one.

desk works best in Ghostty: it has truecolor, full mouse reporting and the Nerd Font icons built in, so everything works as it is. See Terminals for others.

Option
--no-apps desk only; skip the Start menu apps
--no-login Linux: skip the desk SSH account
--uninstall remove desk again (your settings and the desk account are kept)

Pass options after sh -s --, for example curl -fsSL …/install.sh | sh -s -- --no-apps. DESK_VERSION=v0.7.0 installs a particular release; DESK_AUTHORIZED_KEYS=file names the SSH keys for the desk login (by default, those of the account that ran the installer).

The installer is install.sh in this repository: it checks every download against the release's SHA256SUMS, and the apps' own downloads against pinned checksums.

Try it in a VM on a Mac (Apple Silicon; needs brew install qemu), from a clone:

vm/run-mac.sh create            # an Alpine VM with desk installed, a few minutes
ssh -p 2222 desk@localhost

Just the binary: download it from Releases, or go install github.com/gak4u/tui-desk/cmd/desk@latest, and run desk.

desk                   attach this terminal to your desktop (starts it if needed)
desk server            run the desktop server in the foreground
desk settings [PAGE]   the Settings app: network, time, appearance
desk version           print the version

Terminals

desk needs a terminal with mouse reporting and truecolor, and shows Nerd Font icons by default.

  • Ghostty (recommended) has all three built in. On a Mac, add macos-option-as-alt = true to its config for Alt+Tab and Alt+F4.
  • kitty and WezTerm also have the icons built in.
  • iTerm2: keeps the right button for its own menu, so right-click in desk with Ctrl+click after turning on Settings ▸ Pointer ▸ "Ctrl-click reported to apps, does not open menu", or use the Menu key or Shift+F10. Use a Nerd Font, or Plain icons in Personalize. For Alt+Tab and Alt+F4, set Profiles ▸ Keys ▸ Left Option key to Esc+.
  • Others (Windows Terminal, Alacritty, GNOME Terminal…): use a Nerd Font, or choose Plain icons in Personalize.

Over SSH the terminal is the one on your own computer; the machine running desk needs none of this.

Start menu apps

desk runs ordinary terminal apps. The Start menu hides those that are not installed, and Start search finds everything else on your PATH. The installer installs these:

Start menu Program macOS (Homebrew) Alpine Linux (apk) Debian, Ubuntu (apt)
Files yazi yazi yazi, and for previews file ffmpegthumbnailer poppler-utils chafa jq fd ripgrep fzf zoxide 7zip yazi where packaged (Debian 13, Ubuntu 25.04), else its release binary; previews file ffmpegthumbnailer poppler-utils chafa jq fd-find ripgrep fzf zoxide 7zip
Web Browser browsh, else chawan, w3m or lynx chawan (browsh is not in Homebrew) firefox chawan, browsh 1.8.2 from its GitHub release, font-dejavu font-noto font-noto-emoji w3m (browsh and chawan are not packaged)
Terminal your login shell built in built in built in
Text Editor micro micro micro micro
System Monitor btop btop btop btop
Commander mc (Midnight Commander) mc mc mc

The Mac's list also has Vim and htop entries, shown when those are installed.

macOS

The installer puts desk in ~/.local/bin/desk and the Start menu in ~/.config/desk/apps, and installs the missing Start menu apps with Homebrew (if Homebrew is there).

  • CPU, memory, load and uptime come from the Mach host and sysctl; the network from networksetup, ifconfig and route. Wi-Fi signal strength is not shown.
  • Network and Date & time settings open macOS System Settings; desk's own Settings has only Appearance.
  • Alt+Tab and Alt+F4 need the terminal to send Option as Alt (see Terminals). Ctrl+Space needs macOS's "Select the previous input source" shortcut to be off (it is unless you use several keyboard layouts).

Alpine Linux

What the installer sets up (tried on Alpine 3.24):

  • System packages: openssh-server doas ifupdown-ng dhcpcd chrony tzdata. Settings changes the network through ifupdown-ng and dhcpcd, and the clock through chrony and tzdata.
  • The Start menu apps above.
  • desk, desk-admin with a doas rule, and the desk account with /etc/ssh/sshd_config.d/50-desk.conf, whose Match User desk makes its login open the desktop. The installer checks the result with sshd -t and puts the old file back if sshd rejects it; other accounts are not affected.

Debian and Ubuntu

What the installer sets up (tried on Ubuntu 24.04):

  • System packages: openssh-server sudo tzdata, and ca-certificates curl unzip to fetch yazi. NetworkManager and systemd come with the system.
  • The Start menu apps above. yazi comes from apt where the release packages it, else from its v26.9.1 release, checked against pinned SHA-256 digests. Debian calls fd fdfind, so the installer links fd to it for yazi.
  • desk, desk-admin with a sudo rule (/etc/sudoers.d/desk) that lets the desk account run it, and nothing else, as root, and the desk account and SSH setting as on Alpine.

Settings works the systemd way here: Date & time through timedatectl, and the Network page shows the adapters and opens NetworkManager's own nmtui for connections, addresses and Wi-Fi. desk's own DHCP/manual form is for systems configured through /etc/network/interfaces, such as Alpine.

Other Linux

The installer puts desk, desk-admin and the desk login on any distribution; install the apps above with its package manager. Settings manages the clock under systemd, or OpenRC with chrony, and the network through ifupdown or NetworkManager; anything else is shown but not changed.

Updating

Run the install command again to update. Then restart the desktop to run the new version: Start ▸ Shut down desktop, then desk. A desktop with nothing open restarts by itself when a newer desk connects; one with apps open keeps them and shows a reminder.

Using it

tui-desk: Files, System Monitor and a terminal on the Aurora wallpaper

  • Start menu: click Start (bottom left) or press Ctrl+Space, and type to search. Tab completes the top match, Enter opens the selection, and a line with arguments (htop -d 10) gets a Run row. Log out leaves your apps running; Shut down closes them.
  • Adding programs: right-click any app or search result for Add to Start menu and Add to desktop (or press Ctrl+S or Ctrl+D on it). Right-click the desktop for "Add a program to the desktop…". Your Start menu is saved in ~/.config/desk/apps (starting from the system list), the desktop in ~/.config/desk/desktop.
  • Desktop shortcuts: icons down the left of the desktop. Click to select, double-click or Enter to open, right-click to open, pin or remove.
  • Windows: drag the title bar to move, drag an edge or corner to resize; they stay on the screen. The title-bar buttons minimize, maximize/restore and close; double-click the title to maximize. Clicking a window brings it to the front.
  • Scaling: the desktop fills the terminal and follows it when it is resized, or when you log in again from a terminal of another size. Windows keep their place as a share of the screen; an app that opens at a set size, such as Settings, keeps that size while it fits.
  • Right-click: on the desktop for apps, Show desktop, Cascade, Personalize, Settings and Log out; on a title bar or taskbar button for that window's menu. Inside a window, the click goes to the app if it uses the mouse, and opens the window menu if not. Ctrl+click works as a right-click too, and the Menu key or Shift+F10 opens the menu for what is under the pointer (or for the selected Start menu result), for terminals that keep the right button.
  • Taskbar: one button per window. Click to bring it to the front; click the front window's button to minimize it; click a minimized one to restore it.
  • Status area (bottom right): CPU use with the last few seconds as a small graph, the network link as one symbol (Ethernet, or Wi-Fi with signal bars; green when connected, amber when the link has no address or route out, red and crossed out when not connected) and the clock. Hover for a tooltip in words; click for per-core use, load, memory and swap, the adapters, gateway and DNS, or a calendar and the time zone.
  • Scrolling: the mouse wheel scrolls a terminal window back through its history (10,000 lines), and Shift+Page Up / Page Down by a page; a badge says how far back you are, new output does not move the view, and typing returns to the bottom. Full-screen apps (less, vim, btop) and apps that use the mouse get the wheel themselves.
  • Keys: everything goes to the front window, except Ctrl+Space (Start), Alt+Tab (next window), Alt+F4 (close window), Shift+Page Up / Page Down (scroll back) and the Menu key or Shift+F10 (right-click menu).

Configuration

  • Appearance (Personalize on the Start menu or desktop menu): theme, wallpaper, icon set and the empty desktop's message, applied as soon as you click. Saved in ~/.config/desk/desk.conf as theme = …, wallpaper = aurora|waves|gradient|solid, icons = nerd|plain and welcome = show|hide, over defaults in /etc/desk/desk.conf. The desktop rereads the file every second, so editing it by hand works too.
  • Apps: the Start menu lists ~/.config/desk/apps, else /etc/desk/apps, else a built-in list. One app per line, Name|command or Name|command|icon; an empty command opens the user's shell.

$XDG_CONFIG_HOME replaces ~/.config when it is set, on macOS too.

How it works

ssh ──▶ desk (client) ──unix socket──▶ desk server ──pty──▶ apps (yazi, btop, …)
        raw input, size                window system,
        ◀── rendered frames ───        one emulator per window
  • Client (internal/client): puts the terminal in raw mode and relays bytes. It starts the server with setsid, so the desktop outlives the SSH connection.
  • Server (internal/desktop): owns all state on one goroutine. Each window is a PTY plus a terminal emulator (tuios.dev/vt). The server composites the desktop into a cell buffer and sends only what changed (ultraviolet's renderer), at up to 60 frames a second.
  • Input: decoded from the client's bytes. Mouse events drive the window system, or go to the app under the pointer when it asked for the mouse. Keys go to the front window unchanged, except cursor keys, which are re-encoded for apps in application-cursor mode.
  • Protocol (internal/proto): 1-byte type, 4-byte length, payload.
  • Looks: internal/theme holds the palettes, internal/icons the two symbol sets and internal/config the preferences file. The wallpaper is painted with half blocks (two pixels per cell) once per theme, style and size, and kept.
  • System readers (internal/sys): /proc and /sys on Linux; Mach, sysctl and the network tools on macOS.
  • Settings (internal/settings) is an ordinary app in a window (Bubble Tea). It reads state through internal/sys and changes it through desk-admin (internal/admin): the same binary installed as /usr/local/libexec/desk-admin, which the desktop user may run as root through doas or sudo. It checks every argument and does only network, time zone, time sync and clock changes.

Build

./build.sh      # vet, test, then dist/: static Linux binaries (amd64, arm64),
                # and macOS binaries (arm64, amd64) when run on a Mac, with SHA256SUMS

Not yet

  • Several terminals on one desktop at once (a second attach takes over from the first).
  • Images (kitty graphics) inside windows.
  • Copying text out of a window.

Credits

Written with tuios (MIT) as the reference design. Libraries: tuios.dev/vt (terminal emulation), github.com/charmbracelet/ultraviolet (screen diffing, input decoding), github.com/charmbracelet/x/ansi, github.com/charmbracelet/colorprofile, charm.land/bubbletea/v2 and charm.land/lipgloss/v2 (Settings), github.com/creack/pty, all MIT, and golang.org/x/term (BSD-3-Clause).

Colour palettes from the themes' own projects: Catppuccin, Tokyo Night, Gruvbox, Nord, Dracula, Rosé Pine, Everforest, Kanagawa, Solarized and One Dark. Icon code points from Nerd Fonts (Material Design Icons and Octicons); desk ships no font, it only names the code points.

License

MIT

Explore related projects

Loading…