Skip to content
ZacWalkPublic

About

dde, the editor for dd projects: edit, build, test and run from the keyboard. Windows only.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Repository files navigation

dde

Build

dde, the editor for dd projects. Open a folder that dd builds, edit it, and build, test, run and launch it from the keyboard, with the output streaming into a pane beside the code and every error one key away. It is written in C++20 on libdesktop, runs on Windows and Linux, and needs nothing third-party.

dde with the apps workspace open, its search panel finding title_bar_parts across the repositories and dde's app_bars.cpp open at a match

dde with a workspace of eighteen repositories open: each repository's branch and changes in the folder browser, and the address box finding every README.md among them.

Features

  • Title bar and address box — the window's own title bar, as Diffractor's and Potato's: Back and Forward, the address box, Build, Test, Run and Stop, and at its right end ..., the main menu, laid out as Chrome lays out its own (Alt+F). The address box shows where the document is as breadcrumbs, and a press on one lists that folder
  • Main menu — VS Code's commands in Chrome's groups: New File, Open File, Open Folder and Open Recent; Save, Save As and Save All; Cut, Copy and Paste as one row of buttons; Find in Files, Go to File, Go to Line and the Command Palette; Build, Test, Run, Stop and the whole dd menu; a zoom row (the editor's text smaller, its size, larger, and full screen); the Output pane, word wrap and the Markdown preview; More Tools, with the rest of the editor's commands; Help and Exit. Every item has its symbol and its keys, and a dimmed one says why
  • Quick open — type in the address box (Ctrl+P) to find a file by name, fuzzily, as VS Code does — libdesktop readme, appst, dd_project.cpp:42 — or start with > for every command and its key (Ctrl+Shift+P), : for a line (Ctrl+G), @ for a symbol in the document (Ctrl+Shift+O), # for a C/C++ symbol anywhere (Ctrl+T), % to search the files' text, and ? for the list
  • Workspaces — open a folder of repositories, such as a checkout of many projects side by side, with Open Folder (Ctrl+K Ctrl+O), by typing its path in the address box, or as dde-64 <folder>: each repository is a folder with its git branch and how many files have changed, dd runs in the repository of the document on screen or the one chosen in the status bar, and git is only ever read
  • dd built in — Build (F7), Test (Ctrl+Shift+T), Run (Ctrl+F5) and Launch (Ctrl+Shift+F5) from the title bar, the main menu or the command list, with the configuration, the test label, every target and the project's own dd.psd1 commands a click away. dd.psd1 is read as data; nothing of the project's runs because a folder was opened
  • Output pane — the running command's output, live (Ctrl+Shift+U), with its progress in the status bar; double-click an error, or press F8 / Shift+F8, to go to its file, line and column
  • Folder browser — navigate a root folder; create, rename and delete files inline
  • Multi-file search — live search across the folder, grouped by file with highlighted matches (Ctrl+Shift+F)
  • Four document views — text, Markdown, CSV table and hex, chosen automatically and remembered per file
  • Syntax highlighting — C++, Rust, Python, PowerShell and Markdown
  • C/C++ navigation — go to definition (F12), switch header/source (Ctrl+F12), symbols in the document and across the folder, and navigation history (Alt+Left / Alt+Right), using a lightweight lexical index rather than a compiler
  • Editing — unlimited undo, word wrap, indent/unindent, spell check on Windows (Shift+F7)
  • Utilities — JSON reformat (Ctrl+R), sort and de-duplicate lines, evaluate a selected expression (Ctrl+E)
  • Session memory — restores the recent root folders, the last document open in each and the files opened most recently

Open documents are never closed behind your back: unsaved files stay in memory with their full undo history and are shown in red. You are prompted to save only when changing folder, exiting, or running a dd command.

dd itself needs PowerShell 7.4 (pwsh) on PATH; without it, or without dd's dd.ps1 in the repository, the dd menu says so and stays disabled. The branch and changes need git on PATH; without it they are not shown.

Keys

Key
Alt+F The main menu, ...
Ctrl+P Go to a file — the address box
Ctrl+Shift+P Find a command and run it
Ctrl+O / Ctrl+K Ctrl+O Open a file / open a folder as the workspace
Ctrl+G Go to a line
Ctrl+Shift+O / Ctrl+T Go to a symbol in the document / anywhere in the folder
Ctrl+Shift+F Search the folder's files
F7 or Ctrl+Shift+B / Ctrl+Shift+T dd build / test
Ctrl+F5 / Ctrl+Shift+F5 / Shift+F5 dd run / launch / stop
F8 / Shift+F8 Next / previous diagnostic
F12 / Ctrl+F12 Go to definition / switch header and source
Alt+Left / Alt+Right Back / forward
Ctrl++ / Ctrl+- Zoom the editor or the Output pane, whichever has the keyboard
F11 Full screen
Shift+F7 Spell check
F1 About: every command and its key

Run Tests, in the Help menu and the command list, has no key; nor have the zoom row's buttons, which zoom the editor's text.

Building

dde builds on Windows x64 with Visual Studio and on Linux x64 with GCC 13 or later.

On Windows it needs Visual Studio with the Desktop C++ workload. The vendored dd runtime locates Visual Studio and uses the CMake and Ninja that ship with it.

.\dd.ps1 build              # both configurations
.\dd.ps1 test --label unit  # the unit tests, in both configurations, without a window
.\dd.ps1 test --label headless # the no-visible-UI gate: the unit tests and an agent's session
.\dd.ps1 launch             # build Release, then start dde and leave it running

unit and dde remain supported labels. Test presets show passing-test output too. After building, ctest --preset debug -L headless -V --no-tests=error reruns the suite without rebuilding; use release for Release. For a direct GUI-executable test, pipe both streams so PowerShell waits: & .\exe\dde-64.exe /test 2>&1 | Out-Host; $LASTEXITCODE.

On Linux it needs CMake 3.21 or later, Ninja and the development packages libdesktop's Linux backend builds against, which libdesktop's README lists; SDL3 is built from source. dd builds no GUI target on Linux, so the presets are used directly:

cmake --preset linux-debug                # or linux-release
cmake --build --preset linux-debug
ctest --preset linux-debug -L headless    # the unit tests and an agent's session, no window
./exe/dde-64d                             # start dde; ./exe/dde-64 for Release

Output is exe\dde-64.exe, or dde-64d.exe for Debug, and on Linux exe/dde-64 and exe/dde-64d. Neither run nor launch closes an already-running copy, so close the app before rebuilding its executable — or build the other configuration from inside it.

libdesktop is pinned in cmake\dd-dependencies.json; a sibling ..\libdesktop checkout is built in its place when there is one, and a clean clone fetches the pin.

Icon

python tools\generate_icon.py regenerates src\res\app.ico from the teal circular badge and three text-line vectors, in nine desktop sizes, and src\res\app-icon.bmp, the badge at 128 pixels, which is the window's icon on Linux under X11; Wayland takes an application's icon from its desktop launcher, which dde does not install. Add --check to verify without writing, or --output tmp\icon-128.png --size 128 to export another size. Python 3.9+'s standard library and the vendored tools\iconlib.py are sufficient; no sibling checkout, font or graphics package is required. python -B -m unittest discover -s tools -p test_generate_icon.py checks the badge, text-line legibility and generated resources at all nine sizes.

Screenshot

screenshot.png is taken through libdesktop's agent mode, which dde serves with -mcp (docs/design.md): the window is made out of sight - it never appears - on the folder named, and nothing is saved. libdesktop's client drives it, run in the folder holding the repositories, libdesktop's checkout among them:

python libdesktop\tools\mcp_client.py --exe dde\exe\dde-64.exe --args . `
  --allow write,capture --size 1280x800 --call wait_until_idle `
  --call ui_input '{"steps": "key ctrl+p\ntext ''%title_bar_parts''\nwait 1\nkey enter\nsettle"}' `
  --call wait_until_idle --call ui_input '{"steps": "command next_result\ncommand next_result"}' `
  --call wait_until_idle --call screenshot path=dde\screenshot.png

It finds title_bar_parts across the workspace and opens the second match; the client compresses the PNG it saves.

Documentation

  • docs/design.md — architecture, the title bar and address box, workspaces and git, panes, dd integration, keyboard, configuration and limitations
  • docs/cpp.md — the lexical C/C++ index behind go-to-definition
  • AGENTS.md — rules for contributors and coding agents

License

MIT. The executable includes libdesktop, which is licensed under the Mozilla Public License 2.0: anyone distributing the executable must tell its recipients where to get libdesktop's source code, including any changes made to it. tools/iconlib.py is vendored from libdesktop under the same licence. The bars' symbols are a subset of Microsoft's Fluent UI System Icons, MIT licensed, cut by tools/subset_icons.py into src/res/icons.ttf.

About

dde, the editor for dd projects: edit, build, test and run from the keyboard. Windows only.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages