Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DiamondD

A daemon called Diamond. What did you expect?

Contents

diamondd-suite/
  diamondd/            core daemon, tray, dParameters, client library, sysinfo,
                        service manager, systemctl shim, shared themes, shared icons
  apps/
    dstore/            Flathub / Snap app store, with icons and home recommendations
    dtxt/               text/code editor, themes, symbols, font size, tab rename
    dmic/               voice recorder
    dsnappy/            screenshot and screen recorder (DiamondD edition)
    dlens/              camera + Circle to Search + in-app webview search results
    dmv/                video trimmer and merger
    dplay/              game launcher (desktop entries, Steam, Lutris, Wine, Waydroid, Bottles)
    daf/                app finder, fixed icon sizing and description wrapping
    ddates/             calendar with multiple profiles and themes
    dfiles/             NEW: tabbed file explorer with animated navigation and themes
    dmonjav/            NEW: DiamondD edition of Monjav (vendored source + build script)
    dterminal/          NEW: real terminal with a native Xencom parser + 3D viewport
  install-all.sh
  uninstall-all.sh

Each app under apps/<id>/ has its own <id>.py, <id>.desktop, install.sh, and uninstall.sh — the same layout dParameters expects when you hit Reinstall or Delete on an individual app later.

Requirements

  • Python 3 with PyGObject (python3-gi), GTK 3
  • ffmpeg — used by dMIC, dSnappy, dMV
  • Optional: gir1.2-appindicator3-0.1 for the tray icon
  • Optional: gir1.2-gtksource-4 for syntax highlighting in dTXT
  • Optional: gir1.2-webkit2-4.1 (or 4.0) for dLENS's in-app search results — without it, dLENS falls back to opening your browser
  • pynput (pip install pynput --break-system-packages) for dLENS's F9 global Circle to Search hotkey — without it, the hotkey service just won't register; the in-app button still works
  • Optional: scrot or imagemagick (import) for dSnappy and dLENS's screen region capture
  • Optional: fswebcam for dLENS camera capture
  • Optional: flatpak and/or snapd for dSTORE
  • Optional: lutris, Wine, Waydroid, or Bottles for dPlay's extra scanners
  • Optional: systemd-run for resource limits on the systemd fallback
  • Rust + Cargo (https://rustup.rs) if you want dMonjav to actually build — see the dMonjav section below

Install everything

chmod +x install-all.sh uninstall-all.sh
./install-all.sh

Installs Diamond Daemon first, then all 11 apps, marking each installed: true and enabled, then restarts the daemon. dMonjav's build step is best-effort and won't abort the rest of the install if Rust isn't present.

Uninstall everything

./uninstall-all.sh

What changed this round

dLENS — added Circle to Search: click the button in the app, or press F9 anywhere (registered as a DiamondD-managed background service via pynput, so it works even when dLENS isn't open) to select a screen region and search it immediately. Search results now render inside the app through an embedded WebKit2 webview instead of just opening your browser with nothing attached — when you click the upload control on Google Lens or Bing's page inside that webview, dLENS supplies your captured image automatically instead of a real file picker (this uses WebKit2GTK's run-file-chooser signal, a legitimate embedding API, not a workaround). If WebKit2GTK isn't installed, it falls back to the old browser handoff and tells you so plainly rather than pretending it worked.

dSTORE — the home screen now shows ten popular Flathub apps with real icons and descriptions pulled from Flathub's documented /api/v2/appstream endpoint. Search results show icons the same way. Clicking any result opens a detail page with "Download from Flathub" / "Download from Canonical Snap" buttons instead of installing immediately. On the install bug: the most likely cause was that the user-scope Flathub remote was never registered — dstore.py now checks for it and runs flatpak remote-add --user --if-not-exists flathub ... before installing. Snap installs now surface the actual error text instead of failing silently, and retry automatically with --classic if that's what the error says is needed. I couldn't test either path against a live Flathub/snapd setup from where this was built, so if installs still fail, the error message you now see will say why — share it and it can be fixed further.

dTXT — Save As now offers format filters, plus a new Format menu (toggle comment, indent/unindent, upper/lowercase, trim trailing whitespace), a Symbols popover (arrows, math, checkmarks, brackets, misc.), A+/A- font size controls, double-click-to-rename tabs (renames the file on disk too if it's already saved), and a Theme menu with Dark, Medium Dark (Gray), Coder/Matrix, and COTR (rainbow accents).

dDATES — profiles: switch between named calendars from the header bar, each backed by its own save file, with New/Delete profile controls. Same four themes as dTXT.

dAF — icons now load at a forced, consistent pixel size instead of whatever size happened to be available, fixing the mismatched sizing. Descriptions wrap and ellipsize inside the row instead of forcing horizontal scrolling.

dFiles (new) — tabbed file explorer. Each tab has its own back/forward/up history and path bar; navigating a folder crossfades the view via Gtk.Revealer (GTK3's built-in animation widget — a real, if modest, transition, not a placeholder). Same four themes as dTXT.

dMonjav (new) — DiamondD edition of Monjav (https://github.com/AnikuHere/monjav), your own Rust terminal/3D-model project. See the dedicated section below — there's real scope information here worth reading before you expect it to "just work."

dPLAY — now shows real icons per game/app, and scans Wine (via winemenubuilder's generated .desktop entries), Waydroid (waydroid app list), and Bottles (bottles-cli, direct or via Flatpak) in addition to the existing desktop-entry, Steam, and Lutris scans. The Waydroid and Bottles output-parsing is based on their documented/typical CLI output format. It is known that Bottles and Wine scanning may be broken so dont expect clear outputs.

What to do if a registration error appears

If opening one of the DiamondD appplications results in showing a Diamond Daemon registration error, it means this application isnt in DiamondD's app list, found in dParameters. A quick command that can fix this, rechecks all apps for Diamond Daemon applications and then restarts diamondd.

python3 - <<'EOF'
import sys, os, json
sys.path.insert(0, os.path.expanduser("~/.local/share/diamondd/bin"))
from diamondd_common import load_registry, save_registry, DEFAULT_REGISTRY_PATH

registry = load_registry()
with open(DEFAULT_REGISTRY_PATH) as f:
    defaults = json.load(f)

existing_ids = {a["id"] for a in registry["apps"]}
added = [app["id"] for app in defaults["apps"] if app["id"] not in existing_ids]
registry["apps"] += [app for app in defaults["apps"] if app["id"] not in existing_ids]

save_registry(registry)
print("Added:", added)
EOF

And then:

pkill -f diamondd.py
sleep 1
diamondd &

If it doesnt work, restart the whole registery:

rm ~/.config/diamondd/registry.json
pkill -f diamondd.py
sleep 1
diamondd &

If any other issues arise, make a pull request.

dTerminal — why it exists and how it actually works

Because Monjav isnt finished, dTerminal was built - a lightweight terminal for DiamondD. Yes, it includes themes. shocking, right?

System info & permissions API

Any linked app can call get_sysinfo, list_installed_apps, and request_admin from diamondd_client.py. Each is gated by a per-app permission (ask / granted / denied) with a consent popup the first time an app asks, reviewable from dParameters → Permissions. The socket is a Unix domain socket restricted to your user (mode 0600).

"Use DiamondD instead of systemD"

This is a real user-space service manager plus a systemctl command shim — not a PID-1/init replacement. See dParameters → Service Manager for the toggle and resource-limit modes (Auto/Manual/Off). Full explanation is in diamondd/README.md.

About

A daemon called Diamond. What did you expect?

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages